cpp/io/basic istream/get

Extracts character or characters from stream.

All versions behave as s. After constructing and checking the sentry object, these functions perform the following:

@1@ Reads one character and returns it if available. Otherwise, returns and sets failbit and eofbit.

@2@ Reads one character and stores it to if available. Otherwise, leaves unmodified and sets failbit and eofbit. Note that this function is not overloaded on the types and, unlike the formatted character input operator>>.

@3@ Same as, that is, reads at most characters and stores them into character string pointed to by  until  is found.

@4@ Reads characters and stores them into the successive locations of the character array whose first element is pointed to by. Characters are extracted and stored until any of the following occurs:
 * is less than or  characters have been stored
 * end of file condition occurs in the input sequence ( is called)
 * the next available input character equals, as determined by . This character is not extracted (unlike )

@@ In any case, if, a null character ( is stored in the next successive location of the array.

@5@ Same as, that is, reads available characters and inserts them to the given object until  is found.

@6@ Reads characters and inserts them to the output sequence controlled by the given object. Characters are extracted and inserted into until any of the following occurs:
 * end of file condition occurs in the input sequence
 * inserting into the output sequence fails (in which case the character that could not be inserted, is not extracted)
 * the next available input character equals, as determined by . This character is not extracted.
 * an exception occurs (in which case the exception is caught and not rethrown)

If no characters were extracted, calls.

All versions set the value of gcount to the number of characters extracted.

Return value
@1@ the extracted character or @2-6@