I am trying to build a hello-world C++ application using Microsoft Visual C++.
我正在尝试使用Microsoft Visual C ++构建一个hello-world C ++应用程序。
#include <iostream>
int main() {
std::cout << "Hello, world. " << std::endl;
return 0;
}
I get this error:
我收到此错误:
main.cpp(1): fatal error C1083: Cannot open include file: 'iostream': No such file or directory
main.cpp(1):致命错误C1083:无法打开包含文件:'iostream':没有这样的文件或目录
What are the standard include paths for Microsoft Visual C++?
Microsoft Visual C ++的标准包含路径是什么?
Note: I am building from the command-line, not from Visual Studio
注意:我是从命令行构建的,而不是从Visual Studio构建的
1 个解决方案
#1
0
I actually just read through all of the documentation on this at: https://msdn.microsoft.com/en-us/library/ms235639.aspx
我实际上只是通过以下网址阅读了所有文档:https://msdn.microsoft.com/en-us/library/ms235639.aspx
The material looks detailed and complete. If you get things configured like they require then it must work. They provide plenty of checks and conditions for ensuring that you are set up properly.
材料看起来细致而完整。如果你按需要配置了它,那么它必须工作。它们提供了大量的检查和条件,以确保您正确设置。
I am seriously suspecting that you aren't using a developer command prompt window.
我很怀疑你没有使用开发人员命令提示符窗口。
I just did it myself and it works. Use Notepad and name the files like they tell you to do.
我只是自己做了它,它的工作原理。使用记事本并命名他们告诉您的文件。
"Hello world!!"
#1
0
I actually just read through all of the documentation on this at: https://msdn.microsoft.com/en-us/library/ms235639.aspx
我实际上只是通过以下网址阅读了所有文档:https://msdn.microsoft.com/en-us/library/ms235639.aspx
The material looks detailed and complete. If you get things configured like they require then it must work. They provide plenty of checks and conditions for ensuring that you are set up properly.
材料看起来细致而完整。如果你按需要配置了它,那么它必须工作。它们提供了大量的检查和条件,以确保您正确设置。
I am seriously suspecting that you aren't using a developer command prompt window.
我很怀疑你没有使用开发人员命令提示符窗口。
I just did it myself and it works. Use Notepad and name the files like they tell you to do.
我只是自己做了它,它的工作原理。使用记事本并命名他们告诉您的文件。
"Hello world!!"