answersLogoWhite

0

string s;

istream::getline(std::cin, s );

In the above example, s will contain whatever data is extracted from the standard input stream, as a null-terminated string.

int x; istream::getline( std::cin, x );

In the above example, x will be non-zero if the standard input stream has a non-zero value. If the input stream is non-numeric, x will be zero.

User Avatar

Wiki User

12y ago

What else can I help you with?