basic_istream& getline(E *s, streamsize n);
basic_istream& getline(E *s, streamsize n, E delim);
The first of these unformatted input functions returns getline(s, n, widen('\n'))
.
The second function extracts up to n - 1
elements and stores them in the array beginning at s
. It always stores E(0)
after any extracted elements it stores. In order of testing, extraction stops:
delim
, in which case the element is neither put
back nor appended to the controlled sequence.is.
max_size
()
elements.If the function extracts no elements, it calls setstate
(failbit)
. In any case, it returns *this
.