I am newbie to programming and got stuck at the try it out of the chapter 3, called Modeling a Deck of Cards.
So in the code there is:
Code:
printf(âThe first card is %s of %s\nâ, deck[0].value, deck[0].suit);
However Xcode didn't like this at all. I assume the code should be
Code:
printf(âThe first card is %s of %s\nâ, deck[0].name, deck[0].suit);
later when working with loops, there is the same approach:
Code:
for (int i=0; i<52; i++) {
printf(âThe card is %s of %s\nâ, deck[i].value, deck[i].suit);
}
and it doesn't work for me
Can someone please advise?
Thanks