C++ how to structure classes

How are you supposed to structure C++ classes when creating code from the Editor?

It just puts them all together in the base project, with no folders.


Yes, but the Editor sticks everything in the base folder, is that the actual workflow? Create the file then move it.

Should not you be able to specify which folders you want the .h and .cpp files to go into, with the option of creating them if they don’t exist. That seems like a better wizard.

#What Works for Me

put all of your .h and .cpp files in any sub directory structure you want


**put the MyGame.h file in a new directory called **

put the .cpp in the base directory or in a sub directory


Having just done this I can tell you, if you dont put the game.h in “”,

it will compile headers fine,

but if you are just compiling .cpp changes it will complain about not finding the game.h file


PS: this had me confused for at least 2 hours

I dont know, sounds like you want to deliver feedback to Epic :slight_smile:

All I can say is the above, which worked for me to create the entire directory structure of my own choosing

good luck!