Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *dg;
int No1,No2;
int username,password;
if( (dg=fopen("ogr.txt","r")) == NULL )
puts("File can not open !\n"), exit(1);
printf("type username :"); scanf("%d",&username); printf("\n");
printf("type password :"); scanf("%d",&password); printf("\n");
while( !feof(dg) )
{
fscanf(dg,"%d %d",&No1,&No2);
if((No1==username) && (No2==password))
{
printf("Correct Numbers");
}
else
{
printf("Wrong Numbers");
}
}
fclose(dg);
return 0;
}
error message :
ubuntu@ubuntu-desktop:~/Desktop/Debug$ cc readf.c -o 5
readf.c: In function 'main':
readf.c:22: error: stray '\302' in program
readf.c:22: error: stray '\240' in program
ogr.txt
22 45
18 88
94 79
46 92
31 0
98 73
55 0
25 54
65 38
45 77
if I cancel this part if((No1==username) && (No2==password))
code is working, what can be the errors?