Top "Fstream" questions

fstream provides an iostream interface for file I/O in C++.

Why is my fstream being implicitly deleted?

I'm working with a few HID devices, all of which have classes deriving from the following base class (in main.…

c++ class inheritance fstream
c++ - fstream and ofstream

What is the difference between: fstream texfile; textfile.open("Test.txt"); and ofstream textfile; textfile.open("Test.txt"); Are their …

c++ fstream ofstream
How to get the line number from a file in C++?

What would be the best way to get the line number of the current line in a file that I …

c++ line fstream
How to append to a file with fstream fstream::app flag seems not to work

i simply want to write (append) to a logfile. I looked it up here: http://www.cplusplus.com/reference/iostream/…

c++ fstream
How to truncate a file while it is open with fstream

I know it is possible to truncate a file with std::fstream fs(mypath, std::fstream::out | std::fstream::trunc); …

c++ std fstream
std::fstream doesn't create file

I am trying to use std::fstream for io to file, and I want to create the file if it …

c++ stl fstream
How to use fgets if you don't know the number of characters to be read?

I need to read a file and send the text from it to a string so I can parse it. …

c++ c fstream fgets
Reading and writing to the same file using the same fstream

I have a file that already contains some data (say, 8 kB). I want to read something from the beginning of …

c++ visual-studio-2012 iostream fstream
ifstream and ofstream or fstream using in and out

When dealing with files, which of the two examples below is preferred? Does one provide better performance than the other? …

c++ fstream ifstream ofstream
Pass system date and time as a filename in C++

I wanted to make an Attendance system which would take system date and time as file name of the file …

c++ fstream ctime