Yes, it would definately be worth your while to look into vectors and other STL containers like lists and maps and queues.

That kind of looks like you're giving up there, PorkyChop. Resorting to the sorting algorithm in <algorithm>?

Heh, I don't think "resorting" is the verb I would use there. That sort function is a good one(faster than the old C qsort function), and I prefer to use the stuff in the C++ standard library rather than recreating it myself when I really want to get something done. But, if you want to make a sort function yourself, there's a lot of good stuff on sorting at www.gamedev.net

There is another solution to the for loop issue. Just put this at the start of your code.

Code:

#define for if( 0 ); else for

Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie