Only one of your constructors allocates memory for width and height. The other one has undefined behaviour.
1
solved constructor overloading. Getting the wrong solution [closed]
Only one of your constructors allocates memory for width and height. The other one has undefined behaviour.
1
solved constructor overloading. Getting the wrong solution [closed]