let's say
class person has a default constructor that set things to zero.
so if i say
person keith;
then defuallty keith will be sth like (0,0,0,0)
my question is what is
what if class person1 DO NOT have a default constructor?
will person keith; give a syntax error?
Last edited on
Every class has a default constructor (that's partly what makes it default) along with a copy constructor and operator =.
You get an "undefined reference" error, the same as you would if you didn't follow the rule of three.