SarahKate31
Programmer
Hello all...Quick (hopefully) question: I have these structs:
struct CARDS
{
int tagNumber;
int number;
char face;
char suit;
int value;
int sort;
};
struct PLAYER
{
char name [15];
CARDS hand [15];
int handValue;
int handIndex;
};
CARDS deck [52];
PLAYER one;
I want to assign a value (x) into the tagNumber, number, face, suit, value, and sort variables from within a function. This syntax is wrong according to the compiler:
one.hand.suit = x;
What is the correct syntax??? Please help ASAP!! -- SarahKate
struct CARDS
{
int tagNumber;
int number;
char face;
char suit;
int value;
int sort;
};
struct PLAYER
{
char name [15];
CARDS hand [15];
int handValue;
int handIndex;
};
CARDS deck [52];
PLAYER one;
I want to assign a value (x) into the tagNumber, number, face, suit, value, and sort variables from within a function. This syntax is wrong according to the compiler:
one.hand.suit = x;
What is the correct syntax??? Please help ASAP!! -- SarahKate