Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to do sets in cpp

#include <set>

int main() {
  set<int> my_set = {1, 2, 3, 4};
  for (int i = 0; i < 4; i++) {
    cout << my_set[i] << endl;
  }
}
 
PREVIOUS NEXT
Tagged: #sets #cpp
ADD COMMENT
Topic
Name
3+6 =