Does anyone know the mingw keyword for super (referring to inheritance)?
Does anyone know the mingw keyword for super (referring to inheritance)?
"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C
super doesn't exist in C++ you just use the name of the base as in
BaseClassName::Func();
but then I may have misunderstood the question. It's been known to happen
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
Isnt that Java?Originally posted by johnnie2
Does anyone know the mingw keyword for super (referring to inheritance)?
I've never seen 'super' used in C++, Java, yes, but not C++.
*** EDIT ***
Hmm, triple concurrence - that's a first.
*** EDIT again ***
... or was it quadruple?
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
super is not a keyword is C++, and I think you mean "Super Class", which means "Base Class", and neither super nor base are C++ keywords...
none...
Yes it's Java...Originally posted by Fordy
Isnt that Java?
super is a keyword in Java, but not in C++.
none...
Thanks to all for the disturbingly quick replies.
Yes, I immediately remembered Java when I discovered I needed to jump up a class (not necessarily to the topmost base class) and set out to find the C++ counterpart. Interestingly enough, I found this in the C++ reference section, but I couldn't convince mingw to recognize the keyword, hence the question. I suppose a nonexistent keyword is a good reason. Does anyone know to what MSDN is referring here?Originally posted by Fordy
Isnt that Java?
Last edited by johnnie2; 01-28-2003 at 01:39 PM.
"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C
still... the C++ counterpart is to use the base class name. _super must be a VC++ thing
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
Alright, just for fun, is there a way to emulate super and jump up a class or must you explicitly name the upper class all the time?
"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C
how bout putting this in the class cpp file:
#ifdef super
#undef super
#define super BaseClassName
#endif
I know it sucks so does the whole idea.
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter