Right newbie here! Im am tyring to write some code that will read a file i already have and check a login name against what is on file. Then i need it to give an error warning if the name is not there.
I have started this but i havent been able to get it to work. Any help would be much appreciated!
Code:int Login(int* user)
{
char str [80];
int h;
FILE * db;
db = fopen ("text.txt","a+");
printf("Please enter login name: ");
scanf("%s", &h);
fscanf (db, "%s", &user);
if (h != "user") printf("Access Denied! Please Register.");
fclose (db);
return 0;
}