multiple typedef for same type in c -


i have seen multiple typedef same type in c

typedef struct i_data {     uint32 size;     uint8 *data; } i_data, *i_data_ptr;   typedef i_data i_temp;  typedef i_data *i_temp_ptr;  typedef i_data i_search_temp;  typedef i_data *i_search_ptr; 

is possible? how compiler distinguish typedef definition

yes, it's not problem. saying identical.. :)

i_data , i_temp , i_search_temp same thing, typedefs of i_data struct.

i_data_ptr , i_temp_ptr , i_search_ptr same thing, pointers typedef of i_data struct.

if same, in theory why compiler need tell them apart?

it's little person has name , nickname, might not same name it's still same person ;)


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -