Question: / / Our implementation of a vector ( simplified ) template class DynArray { / / Gives access to test code friend class UnitTests _

// Our implementation of a vector (simplified)
template
class DynArray {
// Gives access to test code
friend class UnitTests_Lab1;
// Data members
// NOTE: All values set to -1 for unit test purposes
Type* mArray = reinterpret_cast(-1);
size_t mSize =-1;
size_t mCapacity =-1;
public:
DynArray(size_t _startingCap =0){
// TODO: Implement this method
mSize =0;
};
~DynArray(){
// TODO: Implement this method
}
DynArray(const DynArray& _copy){
// TODO: Implement this method
}
DynArray& operator=(const DynArray& _assign){
// TODO: Implement this method
}
void Clear(){
// TODO: Implement this method
}
Type& operator[](size_t _index){
// TODO: Implement this method
}
size_t Size() const {
// TODO: Implement this method
}
size_t Capacity() const {
// TODO: Implement this method
}
void Append(const Type& _data){
// TODO: Implement this method
}
void Reserve(size_t _newCapacity =0){
// TODO: Implement this method
}
};

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!