quote:
Original post by Dormeur
I don''t know how Java does it, but it works. I''m programming in Java daily at work, and I''m using this feature all the time. I think Java just creates the entire object, including vtables, before actually calling any constructors on the object. Perhaps it''s because Java supports RTTI (Run-time Type Identification) by default, which makes it possible to retrieve info on the classes themselves at runtime, whereas C++ compilers require you to enable it (possibly for performance reasons).
I really think this is so essential to OO programming, that I don''t understand why C++ doesn''t support it.
Dormeur
The problem is not the VTable, the problem is having valid objects in those virtual functions.
I will do some test with java later today and post my results.