Untitled
unknown
c_cpp
3 years ago
361 B
2
Indexable
Never
MyVector::MyVector(char *el, int maxsz) : maxsize(maxsz), size(0) { pdata = new char *[maxsize]; if (el != NULL) { size++; } pdata[0] = el; for (int i = 1; i < maxsize; ++i) { pdata[i] = NULL; } } MyVector::MyVector(const MyVector &v) : pdata(NULL) { *this = v; } MyVector::~MyVector() { delete[] pdata; }