+ 1
How to open a file in c++?
4 Answers
+ 4
#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;
}
+ 1
do you mean opening file to work with or open a photo,video etc.?
+ 1
thnx akwin lopez
0
simply download a c++ program viewer



