What does [] do when called on an int* pointer?
E.g. in this code:
int* someIntPointer = 4000; //pointer points to byte 4000 in memory
++someIntPointer; //pointer points to byte 4004 in memory
someIntPointer[5]; //What memory spot does someIntPointer point to now?
And is it differnt when called on an char*?
It seems to me that calling eg [5] on an pointer increments the pointer by 5, so that it points to a memory spot (5 * the byte-size of the data-type) higher, so e.g. 20 (5*4) for int_32. Is that correct?
Regards and thanks for any answers