Work with sets in C ++

How can I define sets in C ++ and embed values ​​in them?

+3
source share
1 answer

Use std::setclass c <set>.

std::set<int> s; // define a set of ints
s.insert(1);     // insert into a set
+16
source

Source: https://habr.com/ru/post/1783085/


All Articles