Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ vector

Name: Anonymous 2007-09-22 6:52 ID:r16GJhP5

I have a class with two vectors.

I use a while loop to add things into both of them, both inside their own function

they add elements to the vector correct, but for some reason one of them empty itself after the function has ended, even though I did not tell it to.


why would a vector just delete itself randomly at the end of a function?

Name: Anonymous 2007-09-23 2:15 ID:Qi2XqiDM

>>7
it probably was a scope problem. I fixed it about 10 seconds after i wrote this thread, for some reason it deleted the vector after the function ended. I just moved the code to another function and it worked

this means I could have a buffer overflow somewhere in my program. hopefully I'll find it soon :/

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List