What is typedef in C?
eg. typedef struct MyStruct newtype;
The purpose of typedef is to assign alternative names to existing types.
typedef is compile time entity, C is a static language, you cannot create a type during runtime, the type needs to be resolved at compile/link time.
typedef is compile time entity, C is a static language, you cannot create a type during runtime, the type needs to be resolved at compile/link time.
eg. typedef struct MyStruct newtype;
No comments:
Post a Comment