Answers for "c++ vector foreach"

C++
1

c++ vector foreach

std::vector<Entity> entities;

for (Entity& entity : entities) {
	entity.doStuff();                
}
Posted by: Guest on August-11-2021
0

c++ foreach vector

for(int i=0; i < size(vector); i++){
   vector[i]=0;
}
Posted by: Guest on April-07-2021

Browse Popular Code Answers by Language