Answers for "how is file handling useful"

C++
30

File handling

// 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

File handling

[file example.txt]
Writing this to a file.
Posted by: Guest on April-18-2022

Browse Popular Code Answers by Language