hi guysCode:class Vehicle { private: int modelno; char name; string regno; public: int getmodel(); int setmodel(); void addregno(): }; class Car: public Vehicle { };
I wanted to know that is their a way to restrict the derived class "Car" so that it could only use addregno() function of the base class "Vehicle"?
by addregno I mean registeration number.
Does "string" data type allows us to have a characters with both numeric and alphabets?
Thanks