34,333
edits
Changes
→Creating Macros with the #define Statement
The #define statement may also be used in a more advanced fashion to create small fragments of code called ''macros''. These can be thought of as small functions that can accept arguments, perform operations and return results. The following definition declares a macro designed to multiply two numbers together:
<google>ADSDAQBOX_FLOW</google>
<tt>#define CalcInterest(x,y) ( x * y )</tt>