I am stuck on this assignment. Any help is greatly appreciated. Thanks in advance
//////////////////////////////////////////////////////////////////////
void addScore(int score) {
hw[nHW] = score;
nHW++;
}
private:
int hw[12];
int nHW; // number of homework scores stored
};
////////////////////////////////////////////////////////////////
1. The hw member variable can store at most 12 scores. Change the code so that hw can store as many scores as needed when a Homework object is created. (Hint: use dynamic memory). Change/add constructor and destructors as needed.
2. Add a copy constructor for the above case.