0

my program is counting Syables

i need to have the user put in a word, ex. harry and have the cout on the same line,but when they type harry and press enter it moves down to a new line

someone told me that doing cin >> word; than cout << "\335[f"; it would erase the sin and then, later on, take word and put it back when i do cout

where is what I tried

while (true)
{
count = 0;
cin >> word;
cout << "\335[f";
...
...
cout << word << setw(15) << count << endl;

expected result Harry 2

actual result Harry [fHarry 2

  • i figured it out...its "\033[F", not "\335[f" – R Baker 399 Apr 15 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.