I wanted to know if c++ has a variable name limit. i knw that visual basic has a limit on variable name lenth of about 30 characters and was just wondering if the same was true in c++.
the other thing i wanted to know is if you have more than one level of class heirachy, how would i call a function from the base class if the 'visible' class is in say the 4th level?
P.S. i know i'm not being very specific here and i'm not giving code, i just want some general pointers. the code i want to write looks as though it could have up to 10 levels of heirachy so i want to know if i should condence those levels, and if it would be easy or difficult to call base functions from visible interfaces.
No, and no (if you don't hide it explicitly). Variable length limits are imposed by the implementation only and hierarchies can be as deep as... an implementation defined limit ;-)
thanks for the clarification about variable names. now on to the other:
perhaps i got the title wrong, perhaps it should be polymorphism?
I guess i need to be a little more specific.
what i want to create is a heirachy for animals, races and creatures for a game. basically something like:
1. genis
2. family
3. etc...
4. etc...
so there will be some things, for example; move abilities, attack formats and others that will be the same for all creatures of this type and then others will have different attacks etc because they are giant creatures or they are a race and can use tools/weapons/magic etc.
If i'm reading and interpreting correctly, i would have to declare a virtual function (might be getting terminology mixed up with declaration here, not sure :o) in the base class and have the implementation in the interface? could i have a virtual funtion in one of the derived classes too and have the implementation in another level?