struct gameStateInfo { int pile1; int pile2; }; typedef gameStateInfo* gameState; |
Here, gameState is defined to be the name for the type gameStateInfo*, where gameStateInfo is the actual struct type.
Now, no mention of asterisks needs to be made in functions.
void clear(gameState g) { g->pile1 = 0; g->pile2 = 0; } |