Comp Sci Efficient C++ Data Read/Write Program for Employee Pay Increase Calculation

  • Thread starter Thread starter jimmyv12
  • Start date Start date
  • Tags Tags
    C++ Data
AI Thread Summary
The program is designed to read and write employee data, including names, current pay, and pay increase percentages, to a file. Initially, it encounters issues where the output for the second and third employees incorrectly reflects the data of the first employee. The user resolves the problem by rewriting the input file due to a typo. The discussion highlights the importance of accurate data handling in programming. The issue was ultimately fixed, allowing the program to function correctly.
jimmyv12
Messages
10
Reaction score
0
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.
 
Physics news on Phys.org
okay nevermind I figured it out, I just had to re-write the input file because I guess I had a typo
 

Similar threads

Replies
15
Views
3K
Replies
7
Views
2K
Replies
15
Views
2K
Replies
3
Views
1K
Replies
13
Views
3K
Back
Top