Mail Archives: djgpp/2000/11/16/00:58:52
At 11:21 PM 11/15/2000 -0600, you wrote:
>
>"23yrold3yrold" <cbarry AT pangea DOT ca> wrote in message
>news:3a120ffd_1 AT corp DOT newsfeeds DOT com...
>> Hello. I'm having a problem with vectors in DJGPP (and Allegro). I'm
>making
>> a vertical shooter, and just for fun, I've been pumping up how many
>> enemies/bullets are on screen at once. All objects are stored in vectors
>of
>> pointers to them. If the vectors get too large, the program crashes.
>
>OK, thanks to everyone's responses, I found my little problem. Chalk it up
>to an STL newbie; I was deleting elements a little improperly, to the point
Again, make sure that your ADT has _proper_ copy semantics.
class my_class {
public:
my_class();
my_class(const my_class &src); // Copy constructor.
my_class& operator=(const my_class &src); // Copy operator.
~my_class();
};
typedef vector<my_class> my_class_vect;
>where if I deleted 2 elements of a vector in the same frame, program go
>boom. Which explains why it happens more often with more junk onscreen.
>Also.....
>
>To Nimrod A. Abing.
>> So you better compile your proggy with debugging info and trace it.
>
>You so lost me there. I've got to learn to debug one of these days....
Real Soon, Now would be a good time to do so. ;-P Oh, incidentally,
Allegro, well AFAIK 3.9.32 WIP and later, has macros called `TRACE' and
`ASSERT' to help you out when debugging. Read about them in the Allegro
info page, in the section ``Debugging''.
>To Eli Zaretskii:
>> See section 12.2 of the FAQ.
>
>Yup, I read that before. Helps some; I was hoping for what aaaalllllll those
>little numbers are all about. Oh well :)
As for those little numbers, they're not any good for Lotto. Well, not
unless your State Lottery uses hex ;-P
nimrod_a_abing
--------------
+========================================+
| Home page: www.geocities.com/n_abing |
+========================================+
- Raw text -