简体   繁体   中英

Cannot find any header files c++ project in Visual Studio

For the past hour I have been looking at multiple stack overflow questions trying including this one and this one trying to figure out why visual studio cannot open typical source files like stdio.h

I am starting out by building a new project and then selecting the "console app" option, but when I try to compile and run the simple hello world program I get the errors shown below.

在此处输入图像描述

Edit :

Here is the code that is generated by default when choosing the console application option in visual studio that I am trying to run:

#include <iostream>

int main()
{
    std::cout << "Hello World!\n";
}

The issue was that I thought I had the Widows 10 SDK installed, but apparently I did not. I found the answer using this stack overflow thread.

I had to download the Windows 10 SDK from here and restart the visual studio IDE and it worked straight away.

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