JeanDean wrote: > MyClass *obj = new MyClass[3]; > > Even though address returned by new [] is 0x00365f50, > but obj gets automatically updated by 0x00365f54. > Why and who adds these addtional 4 bytes to the address?
Firstly, it's not an error. Secondly, new/delete need space for their own bookkeeping data, how else would 'delete [] obj' know how many objects to destroy before before releasing the memory? Uli -- http://gcc.gnu.org/faq.html http://parashift.com/c++-faq-lite/ _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus