07-24-2023, 01:37 AM
I'm a beginner in C programming, but I was wondering what's the difference between using `typedef` when defining a structure versus not using `typedef`. It seems to me like there's really no difference, they accomplish the same goal.
struct myStruct{
int one;
int two;
};
vs.
typedef struct{
int one;
int two;
}myStruct;
struct myStruct{
int one;
int two;
};
vs.
typedef struct{
int one;
int two;
}myStruct;