basic file operations

来源:互联网 发布:落樱神斧华盛顿知乎 编辑:程序博客网 时间:2024/04/30 06:50
// 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;
}
0 0
原创粉丝点击