passing constructor data to other constructors
I am writing a project which uses inheritence.
My base class has 2 constructors. One constructor using no values and one overloaded constructor which takes 5 values
Code:
Sensor();
Sensor(int, int, int, float, float);
My derrived classes also have the same setup but take additional values e.g.
Code:
typeC();
typeC(float, float );
When instantiating an object for a derrived class passing values, I need to pass the correct values for that particular class, plus the values for the base class, which will in turn be passed to the base class.
How do you do this?
Thanks.