For a particular key I want to insert and print elements of the set corresponding to that key. For, e.g. if I have A - Orange, apple B - Red, blue
How do I print this? So far I have written this:`
std::map<string,std::set<string> > mp;
std::map<string,std::set<string> >::const_iterator row;
std::set<string>:: const_iterator col;
mp["A"].insert("pawan");
mp["A"].insert("patil");
for (row = mp.begin(); row!= mp.end(); row++)
for (col = row->begin(); col!=row.end(); col++)
return 0;`
I don't know how to begin. Please help!`