Untitled
unknown
c_cpp
4 years ago
361 B
10
Indexable
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;
}
Editor is loading...