I have a vector that looks like this:
That contains all kinds of different objects (arms, legs, battery etc) that inherit component, such as:Code:vector<component*> v;
And my problem is.. After I put them into the component-vector, every time I try to call their print_info() function, I get the components print_info()-function, and that one is missing stuff that I want to get printed out to the screen.Code:class arms: public component { ... }
Is there any way to call the RIGHT print_info()-function after putting the arms, legs and battery objects into the component*-vector?