Hi guys,
I want to make a program but I wanted to know that when should we use overloaded constructor?
The default constructor can do the job?Code:class Vehicle
{
private:
string Name;
int reg_no;
public:
Vehicle()
void getName();
void setName();
~Vehicle()
};
The default constructor automatically initializes an object which is created ,so what is the use of overloaded constructor?
Also have I written the constructor correctly?
I hope I am clear
Thanks