What is the "->" operator in C++? And how to use the vector operator?
Name:
Anonymous2012-03-06 22:11
It's supposed to simplify pointer arithmetic when using structures.
a->b;
is the same as
*(a.(void*)*(&a + (&b - &a)));
If you have several nested structures (a la 'a->b->c->d->e;`), then you can see how much simpler it looks using -> notation than it does using pure pointer notation.