Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

in C++, what statement are you goin

Status
Not open for further replies.

sojourn123

Programmer
Oct 4, 2003
1
0
0
US
in C++, what statement are you going to put,if the user press enter, it'll say an error instead of going to a newline.

Example;

cin>>x;

OUTPUT

If you press ENTER it'll go to next line until u enter something.

Thanks! bluexrogue2k@yahoo.com


 
The cin object controls extractions from the standard input as a BYTE STREAM and it is a istream object.
So , it collect all bytes typed in until you press enter , then the constructor is called and all bytes typed in are in the memory variabile x.

-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top