My instructions are to create a program that will ask for a file of test scores and average each students score then average each test score. I have got every thing down to the averages and it will average but it holds on to the numbers after each loop.
I haven't added the deletes yet. I was just trying to get the program to work. I do not understand what you are telling me to do above. Do I put that above the main just like the other initializer? Thanks for the help.
Sorry -- I am suggesting you use vectors rather than dynamically allocated arrays to hold your data.
I am assuming you learned about "vector" before you were introduced to "new". Then again the tutorial on this site doesn't really go into C++ containers at all, which is astounding to me.
No problem I just appreciate the help. I havent learned about vectors in C++. Part of the assignment is to use a multidimensional dynamic array with pointers. The whole works just when I run the program this is what I get:
Student average
3.03333
6.75
10.4833
2.73333
Test average
6.4
9.83333
13.6333
16.5
20.9667
The program works except when it comes to the last part it will add up the numbers and average but it wont start over with each vector it just keeps on adding them up but it stops at the right places. Sorry hard to explain by typing.