I have a txt file that contains name, id number, mobilenumber, and location in comma separated line.
example 
 Robby, 7890,7788992356, 123 westminister 
 tom, 8820, 77882345, 124 kingston road
My task is to retrieve 

Look up all of an employee's information by name.
Look up all of an employee's information by ID.
Add the information of an employee.
Update the information of an employee.

SO far I have read the file and stored the information in a vector. Code is shown below. 
For tasks
1)Look up all of an employee's information by name. I will iterate in the vector and prints information containing the name . I will be able to do that
2) simialry in text file I will look for id and prints information about that.
BUT I am clueless about point 3 & 4.

I am posting my code below

```
void filter_text( vector<string> *words, string name)    
{    
 vector<string>::iterator startIt = words->begin();    
 vector<string>::iterator endIt = words->end();    
 if( !name.size() )        
     std::cout << " no word to found for empty string ";  

 while( startIt != endIt)     
 {      
    string::size_type pos = 0;     
    while( (pos = (*startIt).find_first_of(name, pos) ) !=  string::npos)    
        std:cout <<" the name is " << *startIt<< end;    
    startIt++;     
 }
}     

int main()               
{             
 // to read a text file       
  std::string file_name;   
  std::cout << " please enter the file name to parse" ;    
  std::cin  >> file_name;

  //open text file for input
  ifstream infile(file_name.c_str(), ios::in) ;
  if(! infile)
  {
    std::cerr <<" failed to open file\n";
    exit(-1);
  }
 vector<string> *lines_of_text = new vector<string>;
 string textline;
 while(getline(infile, textline, '\n'))
 {
    std::cout <<" line text:" << textline <<std::endl;
    lines_of_text->push_back(textline);
 }
filter_text( lines_of_text, "tony");
return 0;
}

```