C++ (Qt)struct Piggy { Piggy ( void ) : mType(0), mStr(0) {} ~Piggy ( void ) { delete [] mStr; } // data int mType; char * mStr;}; // использование QList <Piggy > lst; lst.push_back(Piggy()); Piggy & p = lst.back(); p.mStr = new char[128]; strcpy(p.mStr, "Test");
C++ (Qt)char *XXX