Search:
Forum
General C++ Programming
whats the value of z?
whats the value of z?
Oct 26, 2011 at 5:27am UTC
sunny grover
(1)
int z=1;
CT::CT()
{
z=2;
}
CT::~CT()
{
z=3;
}
void main()
{
z=4;
CT*C=new CT;
delete C;
}
Oct 26, 2011 at 5:34am UTC
hamsterman
(4538)
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.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs