modifying cin

I was wondering if it possible to have a default value displayed at a user information prompt?

For example:

if the prompt was something like...

Enter city:


Could I have it output a default city to the console....

Enter city: San Francisco

(and the user could press enter to input the default value, or could backspace to erase and change it)


Thank you for reading!
There is no way to pre-populate std::cin. You will have to find some other API to do that.
Topic archived. No new replies allowed.