需要3次编译的Hello,World!
注意,要写在 未命名3.cpp 里面才能。
上代码!
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("未命名3.cpp","w",stdout);
string str=
"\
#include <bits/stdc++.h>\n\
using namespace std;\n\
int main()\n\
{\n\
freopen(\"未命名3.cpp\",\"w\",stdout);\n\
string str=\n\
\"\\\n\
#include <bits/stdc++.h>\\n\\\n\
using namespace std;\\n\\\n\
int main()\\n\\\n\
{\\n\\\n\
cout<<\\\"Hello,World!\\\";\\n\\\n\
return 0;\\n\\\n\
}\\n\\\n\
\";\n\
cout<<str;\n\
return 0;\n\
}\
";
cout<<str;
return 0;
}