First time using UE4, can't start c++ projects. I can start Blueprint projects but when I create a c++ class it can't compile. Help please!

The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/UE_4.15/Engine/Binaries/DotNET/UnrealBuildTool.exe Joustice Development Win64 -project=“C:/Unreal Projects/Joustice/Joustice.uproject” -editorrecompile -progress -NoHotReloadFromIDE
Creating makefile for Joustice (no existing makefile)
Performing full C++ include scan (no include cache file)
@progress push 5%
Parsing headers for JousticeEditor
Running UnrealHeaderTool “C:\Unreal Projects\Joustice\Joustice.uproject” “C:\Unreal Projects\Joustice\Intermediate\Build\Win64\JousticeEditor\Development\JousticeEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
Reflection code generated for JousticeEditor in 4,4357914 seconds
@progress pop
Performing 8 actions (2 in parallel)
[2/8] Resource ModuleVersionResource.rc.inl
PCH.Joustice.cpp
[3/8] Resource PCLaunch.rc
Joustice.cpp
JousticeGameModeBase.cpp
Joustice.generated.cpp
[7/8] Link UE4Editor-Joustice.dll
[8/8] Link UE4Editor-Joustice.lib
LINK : fatal error LNK1181: cannot open input file ‘wininet.lib’
Creating library C:\Unreal Projects\Joustice\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Joustice.lib and object C:\Unreal Projects\Joustice\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Joustice.exp
ERROR: UBT ERROR: Failed to produce item: C:\Unreal Projects\Joustice\Binaries\Win64\UE4Editor-Joustice.dll
Total build time: 68,64 seconds (Local executor: 0,00 seconds)

What version of visual studio are you using?

Community 2017

How did you create this project?

How did you install vs 2017? Did you include c++ component?

I was actually just able to fix it by (you were right) reinstalling VS and selecting the create games with c++ component.