I am trying to write a simple c program, but I am having trouble declaring "string" arrays. The following code compiles without error:
#define HAND_SIZE 10;
int main()
{
char * cards[13] = { "A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"};
int player[HAND_SIZE];
}
but I cannot make player into an array of "strings" instead of ints. If I do any of the following:
char * player[HAND_SIZE];
char player [HAND_SIZE][];
char player [HAND_SIZE][5];
//repeat the above with '= {}' and '= {""}' initializations
I get the error:
error: expected ‘]’ before ‘;’ token
Why is this happening and how can I declare an empty array of "strings" in c?