I've two character strings, one with the first line of a file (which is "WORKING"), and a second with the word "WORKING". The problem is that when I try to put them in an IF, it says they're not the same!
I've tried to read both of them with printf command but they're the same. I've also tried to use '\n' in the second string but there's not any change.
Here's the code, have a look:
FILE *fl;
fl=fopen("test.txt", "r");
char line_working[100];
fscanf(fl, "%s\n", line_working);
fclose(fl);
printf("%s", line_working); //HERE IT PRINTS: WORKING
char* workinger="WORKING";
printf("\n%s", workinger); //HERE IT ALSO PRINTS: WORKING
getch();
if(workinger==line_working){
printf("OK");
getch();
}
And nothing happens...