Quote:
|
Originally Posted by ace123
The code
Code:
int val = *((&table) + index);
is equivalent to
Code:
int val=table[index];
In fact, I think they compile down to the same code at the end.
|
Technically, that should be
Code:
int val = *(table + index);
because table is a pointer by default. Writing
is just short hand for
Sorry for being pedantic but in programming it can be important.
Matt