The string getline

1 getline reads string string library 

string a;

getline (cin, a); such a read than any of the read character string has to be fast

char a[N];

cin.getline (a, size) char string if defined, may be read cin.getline

3 getline function return value and cin function return value as type bool ,, successful read returns true, false otherwise

getline reads and puts special string when read as a line break or end for reading a certain number of bytes, the space can be read.

 

Guess you like

Origin www.cnblogs.com/Accepting/p/11283304.html