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

C++ vector of objects

Name: Anonymous 2009-07-13 18:46

How the FUCK do I use the iterator (or anything) to access a method of an object contained in a vector (or even a list)??? I've seen it done but for some reason it still won't work in my code...

Also:  How do I maintain a vector/list of dynamically created (ie. with new) objects... the vector/list would be a member of another class, and I would use methods of that class to add or delete objects from that vector or list.

This part may also be what I'm doing wrong, but the iterator thing keeps giving me shit too.  I will post my code in pastebin if it still won't work.

Name: Anonymous 2009-07-15 0:09

>>7,8
word

still need to know whether I'm doing this shit properly as far as making a new ClassB and storing it in the vector goes.

for (std::vector<B>
ok, so, do I not need to use B* as the type or something?

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