I've been trying to figure out how to add an array into a struct... a struct of ints for example would look like this:
struct test{
int a;
int b;
int c;
} test = {0,1,2};
but if I want to have an array for example:
struct test{
int a;
int b;
int c;
int deck[52];
} test;
is this doable? the initialization of the deck (of cards) happens in a different function. when I do it like this, I don't get an error in the struct but I get it when I try to use it... for example if I do this test.deck[i] = 1; it gives me this error:
Error C2143 Syntax Error missing ';' before '.'
if I were to use a , I could write test.a = 1;
Could anyone write a simple struct where a variable in it is an array and then just use it for a simple command?