#include "stdafx.h" class A { }; class B : public virtual A { }; int _tmain(int argc, _TCHAR* argv[]) { B *b; A *pa=b; b = (B*) pa; return 0; }