The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Strange C++ problem. by Michiel2005-03-10 07:59:02
  Memory bug by ToLazyToThink2005-03-10 08:04:39
    Ok, thanks. by Michiel2005-03-10 08:17:34
      If it's not super top secret by ToLazyToThink2005-03-10 08:29:34
        It is for school. by Michiel2005-03-10 08:36:45
          Small correction by Michiel2005-03-10 08:40:17
            White space is a goodthing by ToLazyToThink2005-03-10 09:05:28
              I think it is, yes, because by Michiel 2005-03-10 09:10:53
my other code uses the empty constructor of the Vec-class one time. The point where the program freezes is that where it tries to access vector[more than 10]. If I increase the default start-reserve to, say 20, it stops there. This makes me think the class doesn't increase the reserve correctly when it's needed.

What's the flaw in changeReserve? I may want to make the function public sometime and be able to lower the reserve too.

The begin-size is never zero. But you're right, I should check for that possibility in the constructor.
[ Reply ]
                If the new reserve is less than the vector size by ToLazyToThink2005-03-10 09:15:04
                  Ah, yes. by Michiel2005-03-10 09:17:03
                    Sounds like it by ToLazyToThink2005-03-10 09:24:15
                      Yes, but I've tried all that stuff already... by Michiel2005-03-10 09:27:01
                        What does it do when you step through? (n/t) by ToLazyToThink2005-03-10 09:36:19
                          Strangely enough, it works just fine. by Michiel2005-03-10 09:56:41
                            Up to you, I'm need to get my but in gear by ToLazyToThink2005-03-10 09:58:35
                              Ok then. Here goes. (first piece) by Michiel2005-03-10 10:14:01
                              (second piece) by Michiel2005-03-10 10:14:27

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)