set data to NULL by default

This commit is contained in:
Sandipsinh Rathod 2024-10-11 16:55:23 -04:00
parent 76a1ddd26a
commit 388a52eca1

@ -17,9 +17,11 @@ struct myPair {
T1 first;
T2 second;
myPair() : first(), second() {}
myPair() : first(), second() {
}
myPair(const T1 &first, const T2 &second) : first(first), second(second) {}
myPair(const T1 &first, const T2 &second) : first(first), second(second) {
}
};
// -------- END PAIR IMPL --------
@ -60,6 +62,7 @@ string toString(int x) {
int max(int a, int b) {
return a > b ? a : b;
}
// -------- END HELPER FUNCTIONS --------
// -------- START RAII HELPERS--------
@ -111,6 +114,7 @@ public:
myVec() {
capacity = 0;
length = 0;
data = NULL;
}
myVec(size_t size) {