struct CardT { SuitT suit; int value; };
suit
and value
are examples of fields or members.
int i; SuitT suit; CardT card1; // declare with default initialization if any CardT card2{SuiteT::DIAMOND, 11}; // declare and initialize with values. CardT card3{RandomCard()}; // declare and initialize with function call.
card1.suit = SuitT::HEART; card1.value = 2;
CardTToString
in CardT.cpp