Reading from Istream

Reading from Istream

How can I extract data (contents) from istream without using operator>>() ?.

5

1 Answer

If you want to read characters from the istream, then by using get and getline:

std::istream::get

std::istream::getline

For general reading you may want to use read:

std::istream::read

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.