简体   繁体   中英

What are the standard include paths for MS Visual C++?

I am trying to build a hello-world C++ application using Microsoft Visual 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

What are the standard include paths for Microsoft Visual C++?

Note: I am building from the command-line, not from Visual Studio

I actually just read through all of the documentation on this at: 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!!"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM