I want to write a program to do a process after each sentences. like this:
char letter;
while(std::cin >> letter)
{
if(letter == '\n')
{
// here do the process and show the results.
}
}
I want that when the user press the enter key (means that the sentences is finished) so that we do a process and then after showing some result the user can enter new phrases but the line if(letter == '\n') doesn't work as I expect. please tell me how I can do this. thank you.