streambuf::sgetn

Syntax

int sgetn( char* pch, int nCount );

Parameters

pch

A pointer to a buffer that will receive characters from the streambuf object.

nCount

The number of characters to get.

Remarks

Gets the nCount characters that follow the get pointer and stores them in the area starting at pch. When fewer than nCount characters remain in the streambuf object, sgetn fetches whatever characters remain. The function repositions the get pointer to follow the fetched characters.

Return Value

The number of characters fetched.

See Also

streambuf::sbumpc, streambuf::sgetc, streambuf::snextc, streambuf::stossc