今日、私はC++を学びたいと思っていました。 私は得続けるしかし、これらのエラー:Visual Studio C++で意図的にインクルードしていないヘッダーを開くことができない
を開けませんソースファイル「stdio.hの」
を開けませんソースファイル「TCHAR.H」
を開けませんソースファイル「SDKDDKver.h」
しかし、これらはデフォルトの空のWin32コンソールプロジェクトでも取得します。
これを修正する方法を知っている人はいますか?
OS:Windowsの10
私のデフォルトのコードは次のようになります。
// HelloWorld.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main()
{
return 0;
}
エラーは以下のとおりです。出力ウィンドウに
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "stdio.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\stdafx.h 10
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "tchar.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\stdafx.h 11
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "SDKDDKVer.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\targetver.h 8
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "stdio.h" HelloWorld c:\Users\HP\Documents\Visual Studio 2015\Projects\HelloWorld\HelloWorld\stdafx.h 10
:
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
EDIT:
私はC++インストールしている私は
ファイル]> [新規]> [プロジェクト>のVisual C++
に行ったとき、最初の原因となることが唯一の私は「C++のために...インストール」表示されるでしょう、だから私はのいずれかをインストール信じます最初のオプション(それがどれだったかを覚えていない)とインストール後に私はプロジェクトを作成することができました。
あなたが悪いを持っているように見えますVisual Studio 2015のインストール。 – drescherjm
@drescherjmだから私はそれを再インストールする必要がありますか? – TheXReflex
C++はデフォルトではインストールされません。カスタムインストールを行っていない場合は、アンインストールして再インストールする必要はなく、今度はC++を要求してください。インストール時にC++を選択したと思われる場合は、あなたの質問を編集してください。 –