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-22 17:32 ID:Heaven

>>6
More likely to be a scoping issue; the vector he wants to access are shadowed by something in a more local scope ganking the identifier. But who the fuck cares, let's read some SICP.

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