Are you talking about STL vectors? An STL vector is just like any other template class, so you can use whatever data type you want with it. Here's a little example program:
#include <iostream.h>
#include <vector.h>
int main()
{
// Create a vector of integers
vector<int> v(10);
// Fill it up with stuff
for(int i = 0; i < 10; i++)
v[i] = i;
// Display some data from the vector
cout<<"Max size of vector: " <<v.max_size() <<endl;
cout<<"Actual size of vector: " <<v.size() <<endl <<endl;
// Traverse it with an iterator
vector<int>::iterator iter = v.begin();
while(iter != v.end())
{
// Access the element
cout<< *iter++ <<" ";
}
cout<<endl;
return 0;
}
Output of the program on my OS X machine:
bash-2.05a$ ./vector
Max size of vector: 1073741823
Actual size of vector: 10
0 1 2 3 4 5 6 7 8 9
bash-2.05a$
Since it's STL, all you need to do is change vector<int> to vector<objtype> and change the assignment loop.