Ekast
November 21st, 2005, 07:11 AM
Just got it.
Was my mistake :-)
Was my mistake :-)
|
Click to See Complete Forum and Search --> : Using vector STL Ekast November 21st, 2005, 07:11 AM Just got it. Was my mistake :-) Marc G November 21st, 2005, 07:53 AM Of course that's possible: std::vector<int*> myVectorWithIntPointers; NOTE: you need to be aware that storing pointers in containers is not always a good idea. You need to make sure that the data pointed to by the pointers remains valid and that you cleanup this data once you don't need it anymore. When you deallocate the memory in pointed to by the pointers in your vector, you need to make sure you remove these pointers from your vector because they will be pointing to garbage. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |