Redefining inbuilt data types

#include

typedef int INTEGER /* will work */
But
#define INTEGER int /* will also work*/

INTEGER SomeFunction()
{
…… code
return 0;
}
This will work
But Rule of thumb is
#defines are used for textual replacement whereas typedefs are used for introducing new names.

Leave a Reply

Your email address will not be published. Required fields are marked *