If you want to do that sort of things, you should use a library like pd/ncurses
You can do it with standard streams but the result won't be really nice:
1 2 3 4 5 6
string value;
string default_value = "Hello";
cout << "Input : " << default_value << string(default_value.size(),'\b');
getline(cin,value);
if ( value == "" )
value = default_value;
output the default value and then print some backspace characters to move back
get input
if the user just pressed enter the input value will be an empty string
so set it to the default value
Notice that if the user enter "hi", it will see "hillo" but the value will be only what was entered ( "hi" )
Thanks, that is what I was looking for, I'd like to keep within the standard libraries if possible. If not, I'll try the first method of displaying the value before the input box.
Using the last method, is it possible to somehow get the cursor behind the default Hello?