当然可以,结构体和类的唯一区别就是其成员变量默认为公有,而类为私有。当然它也可以有自己构造函数和析构函数了。例如:class CExample { struct SExample { SExample(){ a = 0x00;b = 0x00;...} ~SExample(){ if(a!=NULL){ delete[] a;} if(b!=NULL){ delete[] b;} ......