I just started learning c++ and I have to write a program which reads data from an input file, then the output has to be shown on the screen and also stored in an output file. This is what the input file looks like
Raymond F. Bixbyouster
443 Delmont Avenue
Strykersville NY 14141
122678.00 125 15
Ellie May Clampet
52 Maplecrest Road
Scio, NY 14333
35410.00 75 10
Hickory T. Brewster
117 Slater lane
Hermitage, NY 143441
12974.00 25 00
I did everything but it doesn't seem to be working properly here's my code
What do you mean by "it doesn't seem to be working properly"? Does it install a virus? Does it add you to an FBI watch list? Does it prevent you from getting a tax refund? Does make your GPU explode? You need to be specific.
It doesn't display the desired results..when i try to run the program it only displays the name and address of the first person and nothing else..and when i go to look at the output file it doesn't contain any addresses, it only contains the gross salary, rating percent, subtotal, level weight factor and gross bonus amount of the first person... So i guess my question is how do i get the program to display the name, address, gross salary, rating percent, subtotal, level weight factor and gross bonus of ALL 3 people AND also store that information into the output file.
Well I'm not sure I've never used loops before so I'm not really sure how for works but i guess i could make it so that if there's a character then it keeps going and if there's no character it stops, but I don't know how to do that the one in the example is with numbers
Well in my project it's always gonna be the same but we have to make it so that it runs until all data is read.. So I guess the other way would be to maybe run until it reaches an empty line? If that's an option..but then the last line might not be an empty line and then it's gonna keep running forever and I don't want that. I don't know I can't figure it out