|
-
July 1st, 2009, 02:28 PM
#1
Preset text for cin
How can you preset suggested text for a cin?
E.g.
cout<<"Old value is: "<<oldVal<<" New value: ";
cin.SetPrefixText(oldVal);
cin>>newVal;
So the user sees:
Old value is: Sam New value: Sam
So, in this made-up scenario the user can just hit the Enter key to keep the existing value.
Is this even possible?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|