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

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -