Can somebody please help me to understand how to make and use a vector of pointers, I am aware that a vector of pointers is used to point to objects of a class, but how do I use one exactly :S. For example, keeping customer info in the vector so that it can be used with a class member object. I know I haven't got a example and I apologise, but if someone could give me an idea on how to create and use one, it would be hugely appreciated.
Using C++ vector iterator provided by STL:
std::vector<std::string>::iterator itVectorData;
for(itVectorData = str_Vector.begin(); itVectorData != str_Vector.end(); itVectorData++)
{
std::string strD = *(itVectorData);
}
Removing elements from C++ vector:
str_Vector.erase(str_Vector.begin()+1,str_Vector.begin()+2);