gpt4 book ai didi

c++ - 基本控制台打印程序

转载 作者:太空宇宙 更新时间:2023-11-04 16:25:30 24 4
gpt4 key购买 nike

#include <iostream>
using namespace std;

int Main ()
{
cout << "---------------------------------------------------------------------------------/n";
cout << "NAME: Justin Chiang/n";
cout << "COMPUTER LANGUAGES: Python, Lua, C++/n";
cout << "FAVORITE VIDEO GAME: Starcraft, Diablo/n";
cout << "I'm taking this class for math undergrad requirement and because it is very useful." << endl;
system("PAUSE");
return 0;
}

输出:

1>------ Build started: Project: HW1, Configuration: Debug Win32 ------
1> HW1.cpp
1>c:\users\asus\desktop\hw1\hw1\hw1.cpp(5): warning C4627: '#include <iostream>':
skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\users\asus\desktop\hw1\hw1\hw1.cpp(25): fatal error C1010: unexpected end of file
while looking for precompiled header. Did you forget to add '#include
"StdAfx.h"' to your source?
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

最佳答案

转到项目属性。单击 Configuration Properties/C/C++/Precompiled Header 并选择“Not Using Precompiled Headers”选项。确切的说明可能会有所不同,具体取决于您使用的 Visual Studio 的确切版本,但基本上您想要关闭预编译 header 。

关于c++ - 基本控制台打印程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12345907/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com