Chapter 3 - Modeling a deck of cards
I just started reading and found this book helpful. As I ran the chapter 3 above file Cards under modeling a deck of cards, the item failed. It turns out the last printf statement should read as follows:
printf("The first card is %s of %s \n", deck[0].name, deck[0].suit);
Change the .value to .name. Otherwise, you can leave as it but change the string from %s to %i.
|