i have a question, i'm studyng the string library type and i have to write this program :
Code:std::string word; while (std::cin >> word) { std::cout << word << std::endl; }
why if my input is :
hi my name is ^Z
the output is :
hi
my
name
is
why the program doesn't fall out from the while loop ?
why my program does not recognize my sequence of end of file ?
i'm a beginner and i need help...thank you