Recieving Compiling Error When Trying to Generate C++ Classes

Hi, recently I decided to teach myself how to use Unreal Engine. I already had Visual Studio 2017 installed. After installing the unreal editor I installed the unreal engine using the visual studio installer. I am able to generate c++ files for my unreal project however when in unreal if I attempt to create new C++ files linked with the project it gives me an error and the log reads

It then creates the file I specified however refuses to show said file in the Unreal Editor. Please help. I cannot add C++ components to objects until this is fixed.

Double check that you have all the necessary VS components installed, not just UE4 support, but also C++ etc. If you already had VS installed you should rerun the configuration tool and add what may be missing.

Here is the official document you should refer to:

I had everything needed installed. I tried again in a basic c++ project and it worked however when I tried to make a 2nd c++ class it failed and resulted in an error once again.

Maybe it is a different one this time. A namespace conflict maybe?