Top "Ifstream" questions

ifstream provides an interface to read data from files as input streams.

Returning ifstream in a function

Here's probably a very noobish question for you: How (if at all possible) can I return an ifstream from a …

c++ fstream ifstream ofstream
C++, reading a file using ifstream

class Person { private: string firstName; string lastName; public: Person() {} Person(ifstream &fin) { fin >> firstName >> lastName; } …

c++ ifstream
Reading binary data into struct with ifstream

I'm trying to read binary data from a file using ifstream. Specifically, I'm trying to populate this "Header" struct with …

c++ struct binary ifstream
What does ifstream::rdbuf() actually do?

I have the following code and it works pretty good (other than the fact that it's pretty slow, but I …

c++ ifstream
What's wrong with the ifstream seekg

I am trying to do a seek and re-read the data. but the code fails. The code is std::ifstream …

c++ ifstream seekg
C++ ifstream not reading \n?

I'm doing a project for school, and i have to read a file, and do stuff with it. that isnt …

c++ text project newline ifstream
ifstream::open not working in Visual Studio debug mode

I've been all over the ifstream questions here on SO and I'm still having trouble reading a simple text file. …

c++ visual-studio ifstream
C++ ifstream on XCode: Where is the default directory?

Ok, so this is the first time I've coded C++ in Xcode (I'm used to ObjC)and I've now started …

c++ ifstream
How to open a file with relative path in C++?

I am writing test cases right now and I created some test files which I try to read. The absolute …

c++ relative-path ifstream absolute-path
Read/Write to PPM Image File C++

Trying to read and write to/from a PPM Image file (.ppm) in the only way I know how: std::…

c++ ifstream ofstream ppm