Question
I'm trying to write my own .h file for my vector template. But I hit a dead end at this point. Can someone help me?
I'm trying to write my own .h file for my vector template. But I hit a dead end at this point. Can someone help me?
Edit1: This is where I'm at right now.
Edit2: Only thing i'm stuck at is PopBack
template
T mUndefined;// Lots of STL functions say that doing something naughty gets "undefined behavior". It could throw, crash, make you eggs, or return nonsense. // Return this undefined one if anybody ever tries to go out of bounds.
public: Vector()// O(1) { mSize = 0; mData = nullptr; Reserve(15); } // Big 3 ~Vector() { // Free all memory delete[] mData; } Vector(const Vector
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started