-
Yes seriously allegro is a very good graphics lib.
I love it and it works well.
As for some comments on the orig code I would use more of a common resoultion eg 640 X 480 or even 800 X 600 which I use for my games. Other than that don't listen to the ramblings of c+Noob as he obvisously is what his name implies
-
I would normally use a resolution like that, but the idea of this game was to have it be a "coffe break" game. I wanted it to be a small game in a small window. Any idea why it's crashing when it reaches that line?
-
begin() + size() is one past the end. Maybe you meant begin() + size() - 1?
-
Why are you cleaning up like that anyways why not let the vector destructor do its job?
-
Yep, that fixed it! Thanks! Vector destructor?
-
>> Vector destructor?
The //Cleanup loop (not the code that caused the error) is not necessary. When the vector goes out of scope (as the program ends) the destructor is called and the elements inside are "erased" automatically. Besides, that code doesn't work the way you want it to anyway since the size of the vector changes every time you erase an element.