|
-
June 13th, 2012, 07:09 AM
#2
Re: Difference between function and macro
A macro replaces the original text in the code before the compiler start to process the file. I.e. every single place where you use the macro will get a duplicate of the code.
A function is a complete section of code i.e. no duplication occur.
Consider macros to be evil and stick to using functions instead, at least until you have a LOT of programming experience. There is no end in how many hard to solve issues you can create for yourself with the use of macros...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|