Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- int main()
- {
- ofstream MyFile("filename.cpp");
- MyFile<<"#include <iostream>"<<endl<<"using namespace std;"<<endl<<"int main(){int a=100;cout<<a;}";
- MyFile.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment