Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~390 People Reached
Favorite Forums
Favorite Tags
c x 3
Member Avatar for Pia_1

I have a problem with registering a new employee for my project. It can only detect the first employeeID as an existing.. Here's my code: void registerNewEmployee(){ FILE *fp; struct employee obj; fp=fopen("data.txt","a+"); system("cls"); printf("\n\t*******************************************"); printf("\n\t*******************************************"); printf("\n\t***\t\t\t\t\t***"); printf("\n\t***\tNEW EMPLOYEE REGISTRATION\t***"); printf("\n\t***\t\t\t\t\t***"); printf("\n\t*******************************************"); printf("\n\t*******************************************\n\n"); char employeeIDNew[5]; printf("Employee Number: "); scanf("%s", &employeeIDNew); …

Member Avatar for deceptikon
0
200
Member Avatar for Pia_1

I have attached data.txt file with contains all of the employees data. The problem is when I login, it would only read one record. Here's my code: #include <stdio.h> #include <conio.h> #include <string.h> #include <stdlib.h> int login(); void displayWelcome(); main(){ int result; do{ system("cls"); result = login(); if(result==1 || result==2){ …

Member Avatar for dev90
0
190