I've noticed something interesting. I want to make sure of it and discuss about it:
These two are not the same:
typedef struct str_type structure
struct str_type{
int x;
int y;
unsigned int z;
uint8_t ui;
};
//-----------------------
typedef struct str_type{
int x;
int y;
unsigned int z;
uint8_t ui;
} structure;
In the first case by writing structure
, we actually write struct str_type
.
In the second case by writing structure
, we are actually writing a whole daclaration
struct str_type{
int x;
int y;
unsigned int z;
uint8_t ui;
}