I have a vector of pointers to Machines:
That is,
vector<Machines*> m;
I populate the vector with pointers and I know the number of machines that exist.
If I created a pointer to a pointer of Machines to the start of the vector:
Machines** m2;
m2 = & m[0];
would I be accessing the vector members as I increment that ‘0’?
m2[0]->dostuff;
m2[1]->dostuff;
...
It seems doable to me but I’m not sure if that’s allowed. 🙂
Thank you in advance!
It’s allowed, but do you realize you can do the following and there is no reason to use
Machines** m2;?