Connecting Tech Pros Worldwide Help | Site Map

Mapping the data

Newbie
 
Join Date: Mar 2009
Posts: 17
#1: Oct 5 '09
Hi I want to flag my data files:-
Here is how the input is:-
Expand|Select|Wrap|Line Numbers
  1. 100154331    100155428    *    54873    Andrew    
  2. 100159575    100159618    "    54873    Andrew    
  3. 100174454    100174676    #    391059    Andrew    
  4. 100174754    100174815    >    391059    Morgan
  5. 100172344    100174815    ?    391059    Morgan
  6. 100316599    100316680    =    178    Austin
  7.  
Here is how I want my output to be like:-
Expand|Select|Wrap|Line Numbers
  1. 100154331    100155428    *    54873    Andrew    start
  2. 100159575    100159618    "    54873    Andrew    m
  3. 100174454    100174676    #    391059    Andrew    end
  4. 100174754    100174815    >    391059    Morgan  start
  5. 100172344    100174815    ?    391059    Morgan  end
  6. 100316599    100316680    =    178    Austin  single
  7.  
I was using multimap like this but I donno howto make it work like this. Any help will be appreciated.

Expand|Select|Wrap|Line Numbers
  1.       multimap<string, int> m;
  2.       m.insert(pair<string, int>("a", 1));
  3.       m.insert(pair<string, int>("c", 20));
  4.       m.insert(pair<string, int>("b", 3));
  5.       m.insert(pair<string, int>("b", 4));
  6.       m.insert(pair<string, int>("a", 5));
  7.       m.insert(pair<string, int>("b", 6));
  8.  
How can I proceed.

Thanks
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,156
#2: Oct 5 '09

re: Mapping the data


Quote:

Originally Posted by cowboyrocks2009 View Post

I was using multimap like this but I donno howto make it work like this. Any help will be appreciated.

I'm sorry but your question makes little sense , that is it is not clear what your are asking and your example multimap appears to have no relationship to the example data you give.
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,363
#3: Oct 5 '09

re: Mapping the data


What part of your multimap is not working?
Reply