My c++ is a bit rusty in the case of class related matters.
I'm wondering how / if constructors are inherited in derived classes. Take for example this class:
Now can the base class constructor be used as the constructor for the derived class? IECode:class Agent() { Agent(); Agent(vector Location); ~Agent(); // other non important functions }; class Worker : public Agent { // class functions };
Worker *object = new Worker(position);
Can any one offer the specifics of this application? Is it legal, better way to do it, etc etc.
Thanks.