As we all know that the new and delete operator , they are inherited
and tell call constructor and destructor respectively . Now Suppose I
have One Integer variable for the base class and one more Integer
variable for the derived class . So if I create some objects of
derived class it should (4+4)=8 bytes for 32 bits machine . But If I
construct an array of objects of derived class (say of size 10) , then
the total size should be (4+4)* 10 = 80 .

But when display the size from within the Overloaded Operator New ,
then it show 84 Bytes means 4 bytes Extra .. How come is this
possible ??


I am giving the link  for the code :- http://ideone.com/3IFms

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to