Answers for "files c++"

C++
14

c++ files

// basic file operations
#include <iostream>
#include <fstream>
using namespace std;

int main () {
  ofstream myfile;
  myfile.open ("example.txt");
  myfile << "Writing this to a file.\n";
  myfile.close();
  return 0;
}
Posted by: Guest on November-09-2019
0

files c++

fstream  afile;
afile.open("file.dat", ios::out | ios::in );
Posted by: Guest on September-22-2021

Browse Popular Code Answers by Language