luxpsycho
Why does this (sample) code not work?
CODE:
##########
struct alpha {
int a;
char b[5];
int c;
} alphas[36]; /**/
struct beta {
float d;
int e;
int f;
} betas[256]; /**/
//struct alpha alphas[36];
//struct beta betas[256];
void main() {
printf("1");
alphas[0].c = 3;
printf("2");
betas[0].e = 0;
printf("3");
}
##########
END OF CODE!
It works to "allocate" either one of the arrays but does not when I try to get them both.
And I need them both! :(
Your help is very much appreciated because my complex and awesome uni project is being jeopardised by this silliness!
Thank you,
Luxpsycho :)
CODE:
##########
struct alpha {
int a;
char b[5];
int c;
} alphas[36]; /**/
struct beta {
float d;
int e;
int f;
} betas[256]; /**/
//struct alpha alphas[36];
//struct beta betas[256];
void main() {
printf("1");
alphas[0].c = 3;
printf("2");
betas[0].e = 0;
printf("3");
}
##########
END OF CODE!
It works to "allocate" either one of the arrays but does not when I try to get them both.
And I need them both! :(
Your help is very much appreciated because my complex and awesome uni project is being jeopardised by this silliness!
Thank you,
Luxpsycho :)