let\'s say i want to have a member variable for a pointer to std::vector but i do not want to specify what type of variable it stores. I want to access only those functions that
The line
std::vector* myVec
is not syntactically correct. One has to specify the type of the vector elements.
You may want to do something on the line of
template< typename T >
class Foo{
private:
std::vector * myVec;
};
However, even that doesn't look nice, re-evaluating the design might be more important here.