I get input from a file called "accounts.txt" and try to compare it with a predefined word such as 'blue'. Here's an example:
int main()
{
char word[50];
ifstream file;
file.open("accounts.txt");
file>>word;
if(word == "blue")
cout<<"The program works";
else
cout<<"The program does not work";
return 0;
}
I never get "The program works" even if the only possible word is blue!
Help me!!!!!!!