I want to create a structure that holds arrays with fixed size inside:
struct smt{
int array1[3];
int array2[10];
int bananas;
};
So that I can use it in my main code. However, when I try to fill the arrays I always get an error:
int main(){
smt name;
name.array1 = {1,2,3};
return 0;
}
The errors are on the name.array1 = {...}; line:
error C2059: syntax error : '{'
error C2143: syntax error : missing ';' before '{'
error C2143: syntax error : missing ';' before '}'
Any help would be appreciated. I've tried to find similar problems but haven't found anything helpful so far.