Y
yw
Hi,
When I use std::cin and std::cout to input some data, how can I ingore the
cin by using the Enter key?
For example:
string sname;
cout<<"Please input your name:"<<endl;
cin>>sname;
If I don't wan't to input anything, just press enter key to ingnore the cin
step, and jump the cin step when the cin requires to input something?
Thanks ,any help will be appreciate.
When I use std::cin and std::cout to input some data, how can I ingore the
cin by using the Enter key?
For example:
string sname;
cout<<"Please input your name:"<<endl;
cin>>sname;
If I don't wan't to input anything, just press enter key to ingnore the cin
step, and jump the cin step when the cin requires to input something?
Thanks ,any help will be appreciate.