I don't understand how classes construct when they are instantiated by a pointer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
class cpolygon{
int base;
int height;
int perimeter;
int area;
public:
cpolygon(){
base=0;
height=0;
perimeter=0;
area=0;
}
cpolygon(constint num):base(num),height(num),perimeter(0),area(num*num){}
};
if I wanted to declare a pointer to an object of this class before an object exists, how does the object get constructed?