I know that chances are low but I'll ask anyway. I have a header .h file that contains typedefinitions for structures that we use in our embedded code for electronics stuff. I'm not allowed to share the code, but example is shown below:
Code: Select all
typedef struct {
CAR Peugeot206;
CAR Peugeot407;
CAR Peugeot607;
} PEUGEOT_CARS;
typedef struct {
int seats;
int wheels;
float mass;
string engine;
LIGHTS reflectors;
} CAR;
typedef struct {
string left_front;
string right_front;
} LIGHTS;
extern PEUGEOT_CARS PeugeotCars;
Code: Select all
PeugeotCars.Peugeot206.seats;
PeugeotCars.Peugeot206.wheels;
PeugeotCars.Peugeot206.mass;
PeugeotCars.Peugeot206.engine;
PeugeotCars.Peugeot206.reflectors.left_front;
PeugeotCars.Peugeot206.reflectors.right_front;
PeugeotCars.Peugeot407.seat;
PeugeotCars.Peugeot407.wheels;
PeugeotCars.Peugeot407.mass;
PeugeotCars.Peugeot407.engine;
PeugeotCars.Peugeot407.reflectors.left_front;
PeugeotCars.Peugeot407.reflectors.right_front;
PeugeotCars.Peugeot607.seats;
PeugeotCars.Peugeot607.wheels;
PeugeotCars.Peugeot607.mass;
PeugeotCars.Peugeot607.engine;
PeugeotCars.Peugeot607.reflectors.left_front;
PeugeotCars.Peugeot607.reflectors.right_front;