+ 1
Can someone explain Typedef to me in really simple language?
Typedef declaration do not define new types ; they introduce a synonym for existing type,they don't affect the over loading mechanism.
3 Respuestas
+ 6
This is quite simple actually. Type def is used by variables mostly and as you know there are e few differences. You have :
1 Characters or also Strings if you use more then one letter.
2 Integers. Numbers that are whole like 12 or 3 or 899 without a decimal
3 Boolean
4 Hexadecimal numbers
5 double numbers
6 Floating numbers
Just to give you an idea, hope you get it.
+ 5
You have answered the question by yourself. It is just assigning a new name to existing datatype or user defined datatype. For instance, I use unsigned long long datatype occasionally, in order to reduce typos l would create a typedef for the same.
typedef unsigned long long bigint;
Now it would be more effective and easy to use the short typename instead of lengthy one.
bigint num1;
is more elegant statement than
unsigned long long num1;
+ 1
following