foreach on a vector of array c++ code example Example: c++ foreach vector for(int i=0; i < size(vector); i++){ vector[i]=0; }