I saw some code in C header like this:
//a.h
typedef struct name name;
//a.c
struct name {
int number;
int age;
};
what is the reason why typedef struct
in header file? and kind of implement it in source file?
Why not just define the struct in header file? what is the propose of doing this?