Top "Ifstream" questions

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

Using ifstream to read floats

I'm trying to read a series of floats from a .out file using ifstream, but if I output them afterwards, …

c++ io ifstream
Is ios::in needed for ifstream's opened in binary mode?

What's the difference between these two? Isn't the in flag object thing redundant? Thanks. std::ifstream file1("one.bin", std::…

c++ ifstream
ifstream vs. fread for binary files

Which is faster? ifstream or fread. Which should I use to read binary files? fread() puts the whole file into …

c++ file-io ifstream fread
Is std::ifstream significantly slower than FILE?

I've been informed that my library is slower than it should be, on the order of 30+ times too slow parsing …

c++ optimization file-io ifstream
Return value of ifstream.peek() when it reaches the end of the file

I was looking at this article on Cplusplus.com, http://www.cplusplus.com/reference/iostream/istream/peek/ I'm still not …

c++ ifstream eof peek
ifstream::is_open vs ifstream::fail?

Reading Savitch's Problem Solving in C++, std::ifstream::fail is shown as an example to check if a file has …

c++ ifstream
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
Using ifstream as fscanf

Assume that I have an input as follows: N (X_1,Y_1) (X_2,Y_2) .... (X_N, Y_N) where N, X_…

c++ c scanf ifstream
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 do you search a document for a string in c++?

Here's my code so far: #include<iostream> #include<string> #include<fstream> using namespace std; …

c++ fstream ifstream ofstream