I want to access a struct within a struct, does anyone know how?
EDIT:
typedef struct{
int a, b;
} struct_1;
typedef struct{
int c;
struct_1 exemple;
} struct_2;
struct_2 Table[100];
Here for example I want to assign a value to Table[0].exemple.a
Thank you.
EDIT: wow im such a dumba.. sometimes it was working iits just that my print was printing 100 times whereas I had just 6 entries so I just had to look up on the print thanks anyway
Exactly like your example:
I think your problem is that
exempleisstruct_2in your example, and notstruct_1like it appears you intended. Try this on for size (with corrected spelling):