Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Write a payroll management assistance program for a company.
A payslip is represented by:
- A number
- The amount of salary
- The corresponding month
- Employer described by: CNSS number, last name, first name, and rank.
The user of this program will be able to:
at. Add a payslip
b. Search all the payslips of an employee identified by CNSS number
vs. Change information in a file
d. delete a payslip
e. Calculate the total amount of all salaries for a given month
If the user chooses to exit, the program must save all the information in
a file and when running this program will load this information from the file.

What I have tried:

i have tried to use structre
and i dont know how to acces files in C language
Posted
Updated 30-Nov-20 12:57pm
Comments
The Other John Ingram 30-Nov-20 18:07pm    
how about displaying some of the code you have written.
google open/fopen, read/fread, write/fwrite, close/fclose

1 solution

Have a look at this page : fgets - C++ Reference[^]. It has sample code that opens a file, reads a line, and closes the file. There is a link in the "see also" section to fputs and that writes a line to a file. That should be enough to get you started.
 
Share this answer
 
Comments
CPallini 1-Dec-20 2:07am    
5.
Rick York 1-Dec-20 3:20am    
Thank you sir.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900