So I keep on running into this issue when I try assigning values to a int array. I read this one expected expression before '{' token, but I am still confused on why it is showing up in my code. I have a feeling I am initializing and declaring the array incorrectly and that's why it is giving my issues.
So, before main () I am declaring some group of global variables (yes I know this is dangerous, but required for my purpose). With that group of global variables I also want to declare an double array of size 3
double rob_size, rob_tilt;
double rob_leftcolor [3];
double rob_rightcolor [3];
Then in the main function, I am initializing the variables and arrays
rob_size = 1.0;
rob_tilt = 0.0;
rob_leftcolor [3] = {1.0, 0.0, 0.0};
rob_rightcolor [3] = {0.0, 1.0, 0.0};
However, I am getting the error message "Expected expression before ' { ' token" at.
First of all, what does that error message mean? Secondly, is that message coming up because I am initializing and declaring the arrays incorrectly?
Thanks