哇啊哦!
  • 板块学术版
  • 楼主deepthinks
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/12/15 20:37
  • 上次更新2024/12/16 12:37:58
查看原帖
哇啊哦!
1358016
deepthinks楼主2024/12/15 20:37

需要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;
}
2024/12/15 20:37
加载中...