use include to read a file

#include<iostream>
#include<fstream>
using namespace std; void process(string filename)
{
fstream file(filename);
file << "Hallo world!" << endl;
file.close();
} int main()
{
#include"haha.txt"
string s = "haha.txt";
process(s); return 0;
}

  

上一篇:FG面经Prepare: BST to Double LinkedList


下一篇:4572: [Scoi2016]围棋 轮廓线DP KMP