Monday, January 12, 2009

#Define vs Typedef

#defines are used for textual replacement while typedef can be used for generating new kind of declaration types.

for example:

typedef int ar[10];

ar hello;
/*
hello is an array of 10 int element.
*/

No comments:

Post a Comment