previous
|
index
|
next
Addressing and Derefencing
To get a pointer to a location, use the address operator
'&'
:
gameState state; state.pile1 = 5; state.pile2 = 8; clear(
&
state);
This says that the address of the struct, rather than the struct itself, is being passed.
previous
|
index
|
next