程序將自己的源代碼寫入記事本

這個例子利用了C++文件讀寫的功能,將main()函數輸出到一個記事本中 #include<fstream> #include<iostream> using namespace std; int main() { fstream fin,fout; fin.open("main.cpp",ios::in); if(!fin) { cout<<"can't open file main.cpp !
相關文章
相關標籤/搜索