How can I achieve this?

I want to be able to ask the user for a number, and then I want to delete the sentence and replace it with another sentence without the program moving onto a new line.

like:
1
2
3
4
5
cout << "Enter a value: ";
cin >> x;
//Delete first cout and replace it with the following
cout << "Enter another value: ";
cin >> y; 

All on the same line. Any suggestions guys?
Last edited on
This is not possible with standard C++. However, depending on which OS you have there might be a function for that.
So you want to clear the screen?
Not the screen, just a line. I've seen it on some programs but never had I given much thought to it. It basically replaces a sentence with another sentence while asking the user to input another value all on one line.
Hi,

Check out the ncurses library

Good Luck !!
Topic archived. No new replies allowed.