Reputation: 151
Is it possible to change the name of the data type that you will be using in your code? Say, instead of defining "int a", you want to do "my_type a" after telling the compiler that "my_type" = "int". Thanks.
Upvotes: 3
Views: 1723
Reputation: 994221
Yes, C supports this using a typedef
declaration:
typedef int my_type;
my_type a;
Upvotes: 5