struct Point {int* a; int b;};
vector<vector<Point> > numbers;
vector<int> example;
The numbers vector has a matrix of a sort and each of the members are pointing to one member in the example vector. A member numbers.at(2).at(3).a is pointing at example.at(3). Now, can I remotely delete a member in the example vector using the pointers? Like so:
delete (*(numbers.at(2).at(3).a));
I know there is a more convenient way to delete members, but this is a very specific case I'm working on.
Your design sounds like a recipe for disaster. Your pointers into example may be invalidated when example grows. They may find themselves pointing at different or non-existent elements if any element of example is erased.
If a points to an element of example, you may not use delete as the element wasn't allocated via new.