Vectors in C++
Hi
I wanted to know how i could implement an Array of vectors (each vector holding a pointer to an object). can someone point me to some webpages. thanks in advance sabeel |
You probably want to use the vector class from the Standard Template Library (STL). STL has ready-made classes for most types of containers and they are used in a consistent way. A good reference to the STL is here:
http://www.dinkumware.com/refxcpp.html Exactly what do you want to do? You seem to be a little confused. Do you want a vector where every element is a pointer to an object? Regards Martin |
do you already know how to use vectors? if you do, then you can use a vector of vectors or if you know how map works, you can make a map of vectors.
one way is to basically define your vector types using typedef: Code:
#include <string> anyway, i don't know of any online stuff except for maybe this: http://www.research.att.com/~bs/C++.html since i use his book for reference mainly: http://www.research.att.com/~bs/3rd.html nice basic examples of the c++ stl containers and a nice look into the specifications of such containers. |
All times are GMT -5. The time now is 09:15 PM. |