Here is the data type I am using.
set< std::pair<string,string>,std::pair<string,string>> foo;
Here is my failed attempt at looping over it
for(auto &e: foo){
cout << e.first << " " << e.second // this is where I am having an issue.
}
Is it possible to use auto this way? e.g
e.first, e.second // some c++ magic (i realize -> is wrong) In pseudo -> // e.third ...
I would love to use auto, but if not how would I write an iterator for the data type I am using?
Aucun commentaire:
Enregistrer un commentaire