namespace and heritage !

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
tft67
Posts: 19
Joined: Sat Nov 08, 2008 2:56 am

namespace and heritage !

Post by tft67 »

I've a compilation error "base class undefined", with some class defined like this :

// in a file called A.h
class A { ... }

// in an file called toto.h:
#include "a.h"
namespace toto {
class B :public A { ...}
}


Does any one understand this error ?
Thanks !!
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Sure - it says that your base class is undefined :-)
Hey, I'm not making fun of you - just trust your compiler if he says stuff like that. You can have several reasons for that. For example your first line in file A.h might be #include "toto.h". Or maybe you simply made a typo - for example you accidentally typed public a instead of public A. Hm, actually I just see that you _did_ make such typo in the example here. You have a file called A.h and include "a.h" - that would work on Windows but not on Linux.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
tft67
Posts: 19
Joined: Sat Nov 08, 2008 2:56 am

found

Post by tft67 »

You'ra right.
I've written "include "toto.h"" in the file a.h !
it was a :oops: stupid error !
Thanks a lot.
Post Reply