How I would have written this assignment in uni:
Simply don't read it into an array. Then add a comment similar to this:
Code:
/**
* Now, the assignment says I am to put all the data in an array. The
* course description says, however, that the course is to learn C++,
* and thus should exclude the teachings of bad practices. As an array
* for reading the data into is not only completely useless, but makes
* the program several times slower.
* Hence, if this assignment is to prove the programmer's understanding
* of dynamic allocation, this assignment is also filled with bad practices
* and contrary to the course description. Otherwise, there is no reason
* to read it into an array.
*/
Summed up: If you want something to be used, mr. Professor, then get a ........ing assignment where it makes sense to use it.
While I would do that in university I still managed to get high grades, even if I refused to do something the way they told me to. But then again, I did do some things on the side. So the first time we had to write some kind of computer AI for a game, everybody used the general brute force technique. My solution, using dynamic programming, was several orders of magnitude faster and could play the game game on a lot bigger boards or just a lot faster than my fellow student's solutions. I got a 10.5 out of 10 for that assignment (like 1 bonus point for doing it dynamically).
So what I am trying to say here is that don't do what I said in this topic. That also concludes that there is no reason, except for my ultimate boredom, to actually post this. Or for you to read this. That also means I just wasted a few minutes (seconds if you're a fast reader) of your time.
Like I said, you shouldn't do this unless you're already a competent programmer who can get away with it by making up for it by making the solution more clever. But on such an assignment like this, you can't really be more clever. Meaning, again, that it's a bad assignment.
That's why I always hated school.
Excuse me for wasting your time, if you read this.