summaryrefslogtreecommitdiffstats
path: root/Help/guide/importing-exporting/MyExe/main.cxx
blob: 35ab2a7c54c58225a055c80337308e9b6d8b6fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// A simple program that outputs a file with the given name
#include <fstream>
#include <iostream>

int main(int argc, char* argv[])
{
  std::ofstream outfile("main.cc");
  outfile << "int main(int argc, char* argv[])" << std::endl;
  outfile << "{" << std::endl;
  outfile << "  // Your code here" << std::endl;
  outfile << "  return 0;" << std::endl;
  outfile << "}" << std::endl;
  outfile.close();

  return 0;
}