P
Peter van der Goes
Had this question from a student and confirmed the behavior in VC++ .NET
2003:
I realize this has been around quite a while (research indicates since
VC5?), but is there a practical workaround that can be placed in the code?
If not, what are the alternatives?
Thanks!
--
**********************************************************************
** All opinions are mine alone.Do not attribute elsewhere!
**********************************************************************
** Peter van der Goes, Professor, Computers & Information Technology
** Rose State College
*********************** Contact ************************************
** Office e-mail: (e-mail address removed)
** Home e-mail: (e-mail address removed)
** Web Page: http://www.rose.edu/Faculty/pvan/index.htm
**********************************************************************
2003:
cout << "Please enter your name: ";
getline(cin,myName);
cin.ignore(100,'\n');
The only problem with this is I have to press "enter"
twice before the input is accepted. Is there a way to
eliminate the need for twice pressing "enter"?
I realize this has been around quite a while (research indicates since
VC5?), but is there a practical workaround that can be placed in the code?
If not, what are the alternatives?
Thanks!
--
**********************************************************************
** All opinions are mine alone.Do not attribute elsewhere!
**********************************************************************
** Peter van der Goes, Professor, Computers & Information Technology
** Rose State College
*********************** Contact ************************************
** Office e-mail: (e-mail address removed)
** Home e-mail: (e-mail address removed)
** Web Page: http://www.rose.edu/Faculty/pvan/index.htm
**********************************************************************