I know that I am doing something wrong, I need help. There is a structure of type Classmates_Info in it two vectors of type string, when I try to infer values with the help of a loop, nothing happens that I thought up wrong? Compiler VS 2015.
for(vector<Classmates_Info>::const_iterator iter = Class.begin(); iter != Class.end(); ++iter){ cout << (*iter).names << setw(maxlenNam) << (*iter).surnames << endl; } struct Classmates_Info{ std::vector<std::string> names; std::vector<std::string> surnames; };
Classmates_Info, why for one vector you useforand others try directly? - Grundyostream& operator<<(ostream &out, const vector<std::string> &names)- andy.37