Posted By: Ayumi
Index Pointer to Array - 06/25/17 22:18
Hey,
anyone know, how to define a Pointer to one Array Index?
E.g:
Now, i have a Pointer to the Struct Array with Index 1(wp[1][0] -> index 2 etc)
But i only need a variable with ONE element of this array, to just use "wp" and not "wp[x][y]"...
Possible?
anyone know, how to define a Pointer to one Array Index?
E.g:
Code:
typedef struct Weapon { int Id; } Weapon; Weapon Weapons[10][3]; ... // Another Function... void Anyone() { Weapon* wp; wp = &Weapons[0][0]; }
Now, i have a Pointer to the Struct Array with Index 1(wp[1][0] -> index 2 etc)
But i only need a variable with ONE element of this array, to just use "wp" and not "wp[x][y]"...
Possible?