Thursday, January 7, 2010

Template In C

You can create a template using Macro in C like the following :

#define add(a,b,op) (sizeof(a)>2)?printf("%f",a##op##b):printf("%d",a##op##b);

0 comments:

Post a Comment