pos = str.find(',')
and str.erase(pos, n)
. Any help would be appreciated.
|
|
Cruz, Terry 340 Temple, Shirley 112 Armstrong, Lance 725 Fey, Tina 202 |
|
|
|
|
|
|
$ ./a.out Cruz, Terry 340 L=Cruz, F=Terry, ID=340 Temple, Shirley 112 L=Temple, F=Shirley, ID=112 Armstrong, Lance 725 L=Armstrong, F=Lance, ID=725 Fey, Tina 202 L=Fey, F=Tina, ID=202 Flintstone Fred 42 Failed at space Rubble,,Barney 33 L=Rubble, F=,Barney, ID=33 Flintstone,Wilma,thirty Failed at id |
std::ifstream fin; fin.open("fileName");
so inf and I think you could put it in a loop, but be careful with it I guess.