Hi..
Suppose I have a multimap like below
multimap<string, int> m;
m.insert(pair<string, int>("a", 1));
m.insert(pair<string, int>("c", 20));
m.insert(pair<string, int>("b", 3));
m.insert(pair<string, int>("b", 4));
m.insert(pair<string, int>("a", 5));
m.insert(pair<string, int>("b", 6));
I want to print a output flags for first element, middle element and last element for multi map. Like e.g,
a 1 start
a 5 end
b 3 start
b 4 middle
b 6 end
c 20 single
Also suppose I want to get the maximum length in a a field. Like here I should get maximum length = 2 which is for c.
Then if suppose I want to format it and set the fix length for this field as 2.
Also lets suppose I want the value to have more than one value like
m.insert(pair<string, int>("a", (int1,int2,string1,string2)));
That means for my key a I have got more than 2 values. How can I make it work since pair is not working in this case ?
Thanks :)