Failing to compile new C++ projects

Whenever I try to create a new C++, a window pops up telling me that the compile failed. I seem to be getting this error:

X:\Unreal\Epic Games\4.8\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(5) : fatal error C1083: Cannot open include file: 'new': No such file or directory

When I compile it in Visual Studio I get the same error as well. I’ve read through alot of other similar questions here, but none of them have fixed my problem. I also noticed I don’t have an error relating to windows.h, like so many others did along with this problem.

I’ve already tried to do these things:

  • Downloaded Windows SDK (both windows 8.1 and 10)
  • Building in Visual Studio
  • Provided links in visual studio like someone did in this post
  • I do not have non-english characters in my username
  • Verifying Unreal engine

I’m not really sure what else to do at this point, so any help would be appreciated.

I found this:

Just tried, but it didn’t seem to fix the problem.

I guess it might help to know exactly what this “new” thing it’s trying to import is. It seems like all my links to the windows SDK are good.

It seems like it must be an issue related to SDK’s due to what is trying to include. You can look in the file itself to see what it is trying to include and it is part of the standard C++ library. Can you try uninstalling those two Windows SDKs and only reinstalling the 8.1 SDK, link it, and see if that works?

Just tried that, still get the same error.

Alright looks like re-installing visual studio fixed it.