We declare an instance of a Hand structure as follows:
Hand h1;
We can then access its sub-structure member elements and structures, as follows:
h1.cardsDealt = 0;
Suit s;
Face f;
h1.card5.suit = club;
h1.card5.face = ace;
s = h1.card5.suit;
f = h1.card5.face;
Note that the card5sub-structure is accessed using dot (.) notation and that the elements of card5 are also accessed using another level of dot (.) notation. In the example given, the member values of card5 are first set to desired values. Then, those values are retrieved from card5 and stored in the s and fvariables, respectively.
Using a pointer to the Hand structure, h1, we access each substructure member element, as follows:
Hand* pHand = &h1;
pHand->card5.suit = club;
pHand->card5.face = ace.
s = pHand->card5.suit;
f = pHand->card5.face;
Note that when accessing the sub-structure elements in this manner,...