Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ map iterator

#include <iostream>
#include <map>
 
int main() {
  std::map<int, float> num_map;
  // calls a_map.begin() and a_map.end()
  for (auto it = num_map.begin(); it != num_map.end(); ++it) {
    std::cout << it->first << ", " << it->second << '
';
  }
}
Source by en.cppreference.com #
 
PREVIOUS NEXT
Tagged: #map #iterator
ADD COMMENT
Topic
Name
2+3 =