so i wrote a program that reads from a disk file and i need the program to read the disk file and separate each line into three fields of text
what would be the best way to do this??
for example i type in a account number and it gives me all the information that comes with that number
7221379 abula 970.51
6853921 allen 343.54
4215534 austin 76.78
5551298 bailey 4563.90
6224649 balovich 34.09
6502286 bates 543.34
8448936 battencourt 1234.23
2883903 blackbrun 767.90
6752376 boucher 844.23
3564698 brown 23.45
6373150 duncan 8759.89
6375372 estrada 3024.45
8736368 fernandez 7563.78
7218536 gallagher 3004.09
6681985 gonzales 5673.45
3909086 ha 3453.54
5221192 hernandez 7483.90
5901163 howard 356.45
2427821 john 435.67
6331655 jose 9009.45
The code above accomplishes everything you asked for in your original post. The code above has minimal error checking. The records stored in the std::vector object begin at the index of zero - remember that if you need to find the first record. There are a number of ways the code above could be improved, but I will leave that to you or another member.