Changing data type name in C
Is it possible to change the name of the data type that you will use in your code? Let's say instead of defining "int a" you want to do "my_type a" after telling the compiler that "my_type" = "int". Thank.
+3
user152169
source
to share
1 answer
Yes, C supports this with a declaration typedef
:
typedef int my_type;
my_type a;
+5
Greg Hewgill
source
to share