Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ for loop

//I think this is a better way for a for loop
//for like going through arrays or something
//hope you like it :)
//be sure to do #include <set>
int main()
{
  set<char> letters = {'A', 'B', 'C'};
  for (auto itr = letters.begin(); itr != letters.end(); ++itr){
    cout << *itr << endl;
  }
}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #loop
ADD COMMENT
Topic
Name
9+5 =