open file in read mode in c++ code example
Example 1: write to file in C++
ofstream myfile;
myfile.open("file.txt");
myfile << "write this to file"
Example 2: c++ file handiling
Welcome to javaTpoint.
C++ Tutorial.
ofstream myfile;
myfile.open("file.txt");
myfile << "write this to file"
Welcome to javaTpoint.
C++ Tutorial.