This line of code causes compiler to complain and enter a debug mode
NSLog(@"Attacker card: %@", [attackerCard suit]);
I wonder whether it is due to the fact that suit is an enum value declared as
@property (assign) Suit suit;
Where Suit is declared as
typedef enum {
CLUBS, DIAMONDS, HEARTS, SPADES
} Suit;
Am i doing something wrong with the format or, the problem lies elsewhere?
The specific size of an enumerated type is implementation defined but it’s always an integer type, so
%dwill work most of the time. If you need it to be very robust, you’ll want to testsizeof(Suit)and choose a format based on that.