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

  • Context: Comp Sci 
  • Thread starter Thread starter jimmyv12
  • Start date Start date
  • Tags Tags
    C++ Data
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
jimmyv12
Messages
10
Reaction score
0
Alright, so basically 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