Carray
struct _s{
char* p;//
_s(){p = 0;}//
_s(_s& old)//
{
p = new char[strlen(old.p)];
strcpy(p,old.p);
}
~_s()//
{
delete p;
}
};
typedef CArray<_s,_s> CSArray;
CSArray ar;
_s s;
s.p = new char[10];
strcpy(s.p,"first string");
ar.Add(s);
ar.RemoveAt(0);//错误出在这里。