I declared a private variable
vector<SomeClass> theVector;
someplace inside my SomeClass class.
Why can't I say: delete theVector inside my SomeClass destructor?
delete theVector
The compiler error says:
type `class Vector<SomeClass>' argument given to `delete', expected pointer
What expected pointer?
To destroy all of the objects held in the vector, you would do the following:
theVector.resize(0);
This will happen automatically when the vector goes out of scope.