|
From: <pr...@le...> - 2003-04-01 10:48:20
|
Thanks Richard.
But I don't understand how the input stream being used by getline() (i.e.
cin) reads in spaces and tabs. Any explanations on that?
<code snippet>
std::getline(std::cin, name);
</code snippet>
Regards,
Pranav Negandhi
This email is a natural product. The slight variations in spelling and
grammar enhance its individual character and beauty and are in no
way considered to be flaws or defects.
<snip>
yeah, you've gotten a few emails telling you to uses the getline function
rather tham cin.
basically cin will read the input string up to the first white space, this
is either a space(" ")or a tab(" ") or a enter( "/n" )
getline however will read everything including spaces and tabs up to the
first 'enter' or "endl"
<snip>
|