The behavior of this function is highly implementation-specific. For example, when used with std::ifstream, some compilers fill the underlying filebuf with data as soon as the file is opened (and readsome() on such compilers reads data, potentially, but not necessarily, the entire file), while other compilers only read from file when an actual input operation is requested (and readsome() issued after file opening never extracts any characters). Likewise, a call to std::cin.readsome() may return all pending unprocessed console input, or may always return zero and extract no characters.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.