Angrez said:
Hi,
It means that you have given a new name to old unsigned data type.
So you can use it instead of unsigned.
For e.g.:
typedef unsigned my_unsigned;
my_unsigned x = 0;
now x will be of type unsigned.
Regards,
Angrez
Yes.
typedef is an useful construct that the language provides. For
example,
just to explain the typedef, Symbian OS C++ provides generic data
types:
"TInt32, TInt16 and TInt8 map onto C++ built-in types in most
implementations.
These types should only be used where the size of the integer is of
first
importance."
Here, the type definition could take the following form:
typedef int TInt32;
typedef short TInt16;
typedef char TInt8;
Using typedef's in such manner provides an easy inference, ease of
portability,
etc.
Kind regards,