Weird Errors in Header File

Hey, so I’m getting some really weird errors in VS Community 2019 and I was wondering if anybody had any ideas how to fix any of them?

First off, I’m getting some super weird errors in my HiddenWords.h file which I’ll put below

Also, my BullCowCartridge.cpp file can’t find my header file

3

I’ve tried moving the header file to both the Source folder and the BullCowGame folder but nothing works. Just to verify that the header file is in the right place, I’ll also attach an image of my file tree.

4

Thank you for your time

Does your code compile? If it does, and you get expected results, but you are still getting the red lines, then go to Unreal and click File > Refresh VS Code Project.

Also, if it doesn’t compile, can you share the full code?
And you know about the UE 4.25 VS Code Intellisense errors right?

You most likely didn’t create HiddenWords.h where you think you did. The solution explorer is not a view of the directory.

When you create a new file in VS in a UE4 project it will put you in the Intermediate directory. If you didn’t change that that’s where HiddenWords.h is located.
Move it out of there and put it in the same directory as your other code in Source. Then regenerate your project files.

Also did you include CoreMinimal.h in HiddenWords.h?

Thank you so much!
I had no idea that HiddenWords.h was in the Intermediate directory. I moved it to the same directory as my other files and it works perfectly!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms