“Expected expression before ‘ { ‘ token”

Best to do the init’ing at declaration time:

double rob_size = 1.0;
double rob_tilt = 0.0;
double rob_leftcolor [3] = {1.0, 0.0, 0.0}; 
double rob_rightcolor [3] = {0.0, 1.0, 0.0};

Only the arrays need to be done that way, but it’s best to do them all the same way.

Your alternative is

rob_leftcolor[0] = 1.0;
rob_leftcolor[1] = 0.0;
rob_leftcolor[2] = 0.0;

Leave a Comment