Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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.
";
  myfile.close();
  return 0;
}
 
PREVIOUS NEXT
Tagged: #files
ADD COMMENT
Topic
Name
2+5 =