VC++ STL Vector problem

Programming, for all ages and all languages.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:VC++ STL Vector problem

Post by Colonel Kernel »

Doh, you're right -- I was thinking assignment operator, not copy constructor. :P
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Kemp

Re:VC++ STL Vector problem

Post by Kemp »

And it works :o It actually works. Apparently you were exactly right, and the copy constructors did make all the difference. Thanks for all the help guys, now I just need to work out the other hundred or so bugs ::)

Thanks again :)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:VC++ STL Vector problem

Post by Solar »

No problem, I was happy to help.

Perhaps next time you believe us right away...?!? ;)
Every good solution is obvious once you've found it.
Kemp

Re:VC++ STL Vector problem

Post by Kemp »

Yeah, I probably should believe you quicker, you have like a million times the experience I have :) It just completely threw me because I couldn't see how pushing an object with a couple of invalid pointers onto a vector could produce results very akin to corrupting the stack. Oh well, time to make sure all my copy constructors are solid.
Post Reply