whats the value of z?


int z=1;
CT::CT()
{
z=2;
}
CT::~CT()
{
z=3;
}
void main()
{
z=4;
CT*C=new CT;
delete C;
}
Where?
Is it really hard to follow, though? You know that new calls the constructor, and delete calls the destructor, right?
Topic archived. No new replies allowed.