My code looks like this
struct {
int valid;
int pid;
int heading;
int speed;
} car;
struct car road[10]; //a road filled with cars
However, my compiler is complaining:
"incomplete struct/union/enum car: road"
What am I doing wrong? I looked at examples online and they show that this is how to initialize arrays of structs.
If it isn't obvious, I'm trying to make an array of car structs
struct
?