//entrada is the fstream I opened
if (entrada.is_open())
{
while (!entrada.eof())
{
char palabra[1024];
entrada >> palabra;
if(entrada.eof())break;
cout << palabra << endl;
}
entrada.close();
}
the program shows me the text and doesnt finish the loop of the while, doesnt reach the .eof