I am trying to read (x,y) floating point values from a txt file in C++. The numbers are separated by a space. The ith number and the i+1th number make ...
I am trying to read (x,y) floating point values from a txt file in C++. The numbers are separated by a space. The ith number and the i+1th number make ...
C++ beginner here, I am trying to append some text to a pre-written .txt file where every line there is a word. I have been using the method ofstream ...
Here is the code: This function is being called from main, filename contains some formatted text, like email database of the next view: gottaletit ...
For example, I used std:: ios:: in to construct a fstream. Can I get the file mode of the fstream later; I use flags () to get flags and use "&" t ...
The problem is that I don't know how to properly change the character in the file to a string. I tried this but... It doesn't work properly. The e ...
I'm sorry for the vague title, but I don't know what else to say. Here is my program: Whenever I run it, it compiles, but nothing happens. I tried ...
When I write a simple ofstream and ifstream instance ,ifstream is working but ofstream is not working. When I run this program ofstream is creating bu ...
I want to create a database in a txt file and access it and edit certain parts of it using seekp(), but when I open the file to write in it , the prog ...
I have a structure defined array of objects with different data types, I'm trying to write the contents to a file but one of the char values is more t ...
I'm new to C++ so I'm not fully used to the syntax yet. I do know more than the basics of C# syntax tho, which I have been using for the better part o ...
I want to increase the second line in my file, but I can't. How can I do it? Here is my file content 0 0 I want to increase the second '0' by 1. H ...
I am writing a program which reads large (10Gb+) text files, structured in chunks, like this: A chunk consists of the @header, the ATCG sequence, t ...
I'm trying to build a program that will create a .txt file and store some basic data within. Currently, the setup is pretty basic, but I've run into a ...
I have a set of code that will read in ints from a text file and put it in some matrix object. I want to modify this function so when I call the op ...
To explain briefly: Using <fstream>, I write a std::list instance to a .txt file: However, when I read from the same file and assign the data ...
i was trying to write some data to a file in binary, the following is the minimal reproducible example of the problem, i am trying to print two unsign ...
I'm new to file read/write in c++. Please someone help me the best way to read the file somewhat like shown below ta class like this please someo ...
I was getting some help on creating files with fstream, but came across this method where you pass std::fstream::trunc to the constructor. I was curi ...
i'm trying to write a simple program in the console, simple program to store data that is input from the user. simple numbers. the result i'm getting ...
I want to make copies of the exe file itself multiple times. I tried the following code: #include <fstream> #include <string> int main( ...