Message-Id: <3.0.1.32.20001116141549.006a9770@wingate> X-Sender: n_abing#ns DOT roxas-online DOT net DOT ph AT wingate X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Thu, 16 Nov 2000 14:15:49 +0800 To: djgpp AT delorie DOT com From: "Nimrod A. Abing" Subject: Re: DJGPP no like vectors? Cc: cbarry AT pangea DOT ca In-Reply-To: <3a136b0e_3@corp.newsfeeds.com> References: <3a120ffd_1 AT corp DOT newsfeeds DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk At 11:21 PM 11/15/2000 -0600, you wrote: > >"23yrold3yrold" 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_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 | +========================================+