#include using namespace std; template struct itf_T { virtual void doit() = 0; }; struct obj_base { int nb; obj_base() : nb(42) {} }; template struct obj : public itf_T, public obj_base { void doit() {cout << "hello" << endl;} }; int main() { itf_T * i = new obj(); i->doit(); cout << (dynamic_cast(i))->nb << endl; cout << ((obj_base *)(i))->nb << endl; return 0; }