【发布时间】:2012-07-27 16:03:22
【问题描述】:
我是 C++ 新手。我刚开始!我在 Visual c++ 2010 Express 版本上尝试了一个代码,但我收到了以下代码错误消息。
------ 构建开始:项目:abc,配置:调试 Win32 ------ ugo.cpp c:\users\castle\documents\visual studio 2010\projects\abc\abc\ugo.cpp(3):致命错误 C1083:无法打开包含文件:'iostream':没有这样的文件或目录 ========== 构建:0 成功,1 失败,0 最新,0 跳过 ==========这是代码
// first.cpp -- displays a message
#include <iostream> // a PREPROCESSOR directive
int main(void) // function header
{ // start of a function body
using namespace std;
cout << "Come up and C++ me sometime.\n"; // message
// start a new line
cout << "Here is the total: 1000.00\n";
cout << "Here we go!\n";
return 0;
}
【问题讨论】:
-
这一定是某种安装问题。
-
仅供参考,您应该避免在代码中使用制表符。在像这样的问答网站上进行格式化时,它们很难处理。请改用空格。
-
我假设您的包含路径包括 VC 包含目录(在程序文件下)。但是,在安装 VC 时,您是否选择了本机文件?
-
嗨,大卫,这是我的包含路径中的内容:程序文件 (x86) > Microsoft Visual Studio 10.0 > VC > 包含 > srv.h
-
@大卫。安装VC时如何选择native文件?
标签: c++