cplusplus.co.il

Archive for the ‘questions’ Category

A question of memory layout

Posted by: rmn on: 20/01/2010

Actual object memory layout can be a little tricky when inheritance and its virtual tables are involved. And it gets even trickier when pointer arithmetic is employed. Do you consider yourself a low-level expert?

Problematic declaration syntax

Posted by: rmn on: 20/08/2009

This question was written by a friend who luckily let me use it. It presents a very common pitfall of C++, regarding the syntax of decleration statements.

Destructors and placement new

Posted by: rmn on: 16/08/2009

When using placement new operator, destruction isn’t as transparent as usual..

Constructor selection with virtual inheritance

Posted by: rmn on: 11/08/2009

Virtual inheritance has quite a few common pitfalls, one of which is related to the construction of the virtual base.

The given two statements actually translate to two very different declerations.


Follow

Get every new post delivered to your Inbox.

Join 25 other followers