the reason for which the ide wouldn`t accept my insert function was because I switched the order of parameters in the function, the intellisense function helper description is impossible to understand.
Just wanted to point out that you should choose the right STL container. The vector is designed for sequential insertion/access. If you want to frequently insert at both ends then you should consider using a std::deque
Yes, STL containers are just template classes and can be manipulated the same as any class objects. And as such, a vector may contain objects, or pointers to objects. But remember in the second case that the items pointed to, must not be removed while the vector still owns them.
std::vector<char*>* pMyvec = newstd::vector<char*>(); // a pointer to a vector of pointers.
// use push_back to fill the vector with pointers:
// pass the vectro to a function:
int result = myfun(pMyvec);
// on return the contents may have been changed
BTW you should not use malloc in C++ code, as new and delete is the correct way to manage memory.
If you add an object to an STL container (vector, list, set, map...), the object is copied into the container. The objects must all be of the same type, however. The only way to put polymorphic objects into a container is to use a container of pointers to their common base class, in which case the objects need to survive outside the container, probably by having been allocated from the heap.