Top "Istream" questions

In C++ std::istream is the base class for input streams.

Read from cin or a file

When I try to compile the code istream in; if (argc==1) in=cin; else { ifstream ifn(argv[1]); in=ifn; } gcc …

c++ istream
how can I convert istream * to string or just print it?

The below function part of connector/C++, it returns a istream*. if i just try and print it, it shows …

c++ pointers mysql-connector istream
How to use istream with strings

I would like to read an file into a string. I am looking for different ways for how to do …

c++ visual-studio string gcc istream
ifstream's operator>> to detect end of line?

I have an irregular list where the data look like this: [Number] [Number] [Number] [Number] [Number] [Number] [Number] [Number] [Number] […

c++ parsing operator-overloading ifstream istream
Passing istream into a function

I am making a game-type program similar to the idea of pokemon. We have a tournament class that keeps track …

c++ ifstream istream
How to assign istringstream and ifstream to an istream variable?

I want to have a variable of type istream which can hold either the contents of a file or a …

c++ ifstream istream istringstream
Conveniently copy std::vector<unsigned char> to input stream (std::istream) object

I'm trying to make use of a function which comes in a 3rd party lib and expects an input stream …

c++ vector copy istream unsigned-char
How to create C++ istringstream from a char array with null(0) characters?

I have a char array which contains null characters at random locations. I tried to create an iStringStream using this …

c++ istream arrays null-character
non-blocking std::getline, exit if no input

Currently I have a program that reads from the standard input, occasionally the program needs to just keep running if …

c++ istream