I am new to c++ programming.
I want to create a program which includes the following line of codes
now what the problem is that i want to write a member function which can copy each of the drive class objects to each other I mean these lines should be validCode:class cars { . . . }; class PatrolCars:public cars { . . . }; class CNGCars:public cars { . . . };
should i create a copy constructor or should i overload an operator for this?Code:PatrolCars patcar; CNGCars cngcar; patcar=cngcar;
plz help!



LinkBack URL
About LinkBacks


