When you define a struct globally, why can't you define the structure members globally as well (outside of using the initializer syntax)? The error I'm getting from clang is that system_1 has an "unknown type name".
If you define the struct within a function, such as main(), then you don't run into any issues.
typedef struct Light_System {
int redLightPin;
int yellowLightPin;
int blueLightPin;
} Light_System;
Light_System system_1;
# "Light_System system_1 = {4, 0, 0}" works
system_1.redLightPin = 4; …Run Code Online (Sandbox Code Playgroud)