2005-01-29から1日間の記事一覧

Where are the virtual functions? Where is the hierarchy?

VC++7.1とGCC3.3.3で確認. #include <iostream> #include <string> // shape抽象基底クラス.というかinterface.これのオブジェクトは // それ自身参照として振舞う. class shape { public: template<class T> shape(T &x) : this_(&x) , vptr_(&vtbl_initializer<T>::vtbl_) { } void d</t></class></string></iostream>…