error: 'CEditor' does not name a type

Posted 11 January 2012 - 09:15 AM

Hi All

I've been following game-making tutorials on SdlTutorials.com and I'm now trying to make a simple editor to edit maps, entities, etc.

The CEditor class is a descendent of the CEntity class which has no problems on its own. When I try to declare a simple static object of CEditor, EditorControl, the compiler tells me that "'CEditor' does not name a type", even though I've included the correct header file and header guards in an apparently correct way.

Re: error: 'CEditor' does not name a type

Yes, the CEntity class works fine. Thanks, I was not sure before about the constructor so I've been doing this to 'make sure'. I guess I would only have to do this if it was virtual.

My code suddenly wants to compile now and I have no idea how it worked this time. I literally just opened the project and hit 'compile and run' and it worked! It must have been some weird bug on my computer.

Re: error: 'CEditor' does not name a type

Posted 12 January 2012 - 09:26 AM

Douggler, on 12 January 2012 - 11:20 AM, said:

My code suddenly wants to compile now and I have no idea how it worked this time. I literally just opened the project and hit 'compile and run' and it worked! It must have been some weird bug on my computer.

Or maybe you forgot to save & rebuild after the last correction that you made last night.