C++ read/write data help (1 Viewer)

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Alright, so basicly I'm writing a program that will copy three people's first and last name, current pay, and pay increase %. Then, write it to a file that gives their name, and new pay after the increase has been applied to the current pay. When I launch the program, then open the output file to see if it worked, person one works fine, then, for person two, it gives the name, and pay increase, but with person one's %. Then person three is just a copy of person two.

Is there anything I need to add in between each person's code to help fix this? I would show my code but I have no idea how to copy it from pico(I'm using telnet with my school). So if anyone would like to see the code and knows how to do that, I'll happily show the code.
 
okay nevermind I figured it out, I just had to re-write the input file because I guess I had a typo
 

The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top