C++ (Qt)struct Test{ char m_data; // sizeof(char) == 1 Test m_test; // sizeof(Test) == X};
C++ (Qt)class Test;class Test { Test *mTest;}
C++ (Qt)#include <iostream>#include <memory> using namespace std; struct Test{ unique_ptr<Test> m_test;}; int main(int argc, char *argv[]){ cout << "Hello World!" << endl; return 0;}
#include <iostream>#include <QScopedPointer>using namespace std;struct Test{ QScopedPointer<Test> m_test;};int main(int argc, char *argv[]){ cout << "Hello World!" << endl; return 0;}