Tom,
In fact, card_t is a number. C/C++ allows you to not specify the number, but as far as the compiler is concerned the statement is the same as:
typedef enum{spades=0, hearts=1, clubs=2, diamond=3} card_t;
So you could either return spades; or you could return (card_t)0;. Same thing.
In other words, no, it’s not possible to have an enumerated value which is not numbered.
Does that help?
Heath
> --
> You received this message because you are subscribed to the Google Groups "cpputest" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
cpputest+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.