#include "stdafx.h" using namespace std; class Test { public: int i; int getTest() { return i; } }; typedef struct _tag_Test { int i; } TEST; int _tmain(int argc, _TCHAR* argv[]) { TEST* t = new TEST; t->i = 1; Test* tt = (Test*)t; printf("%d ", tt->getTest()); printf("%d ", tt->i); getchar(); return 0; }