hi, this is my new code...i just managed to redo again.
Originally Posted by IceDane
there's this error saying that there's invalid lvalue in my assignment.
char c, line_buffer, user;
fpassword = fopen("C:\\PASSWD.TXT", "r");
if (fpassword == NULL) printf("File doesn't exist\n");
printf("Enter userid: ");
printf("Enter password: ");
while( fgets(line_buffer,sizeof(line_buffer),fpassword) != NULL ) /* read from file while still data available */
char ftemp, fpass, fuser;
if( sscanf(line_buffer,"%.20s %.20s %.20s",ftemp,fpass,fuser) != 3 ) /* Make sure we parsed 3 fields from the line */
/* Invalid line in file, skip to next one */
else /* Otherwise, we got 3 fields */
if (user == fuser && pass = fpassword)
printf("User Not Authorized");
i think the part of my assignment of user==fuser is wrong? is it wrong?