This is really a basic question, but I'm not sure how to do it.
I have a pointer to a vector (or an array of pointers), say
vector<int *> *p;
Is there any alternative syntax to index this array other than
(*p)[i];
related operator β?
p->at(i) similar, but checks the bounds and throws an exception if i out of range. It looks better than yours and Luchian's (IMO) solutions, and a little safer.
p->at(i)
i
Yes -
p->operator[](i);
but it is not better if you ask me.