Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

iterate const vector

void func(const std::vector<type>& vec) {
  std::vector<type>::const_iterator iter;
  for (iter = vec.begin(); iter != vec.end(); ++iter)
    // do something with *iter
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #iterate #const #vector
ADD COMMENT
Topic
Name
2+2 =