Monday, August 08, 2011

Macros

A very neat, useful, efficient and flexible way of coding in C is using macros. #define something with capital letters (naming convention used for macros to stand out within the code), write the code to be executed when calling the macro - and you're golden! There are drawbacks like unpredictable macro behavior (depends on the code used...++i?), however a careful use of macros can save you a lot of time and typing :)

No comments:

Post a Comment