
- Forum
- Programming Talk
- C and C++
- About Macros
About Macros
This is a discussion on About Macros within the C and C++ forums, part of the Programming Talk category; Are there any disadvantages because of using many macros in a C programming language? I want to know about that. ...
-
About Macros
Are there any disadvantages because of using many macros in a C programming language? I want to know about that. Someone kindly provide a detailed explanation on this.
-
Macros must be handled by programmers with great care only when needed. Some of the disadvantages are:
The ways in which macros are handled by preprocessors vary greatly from compiler to compiler.
The impossibility of including C directives within a macro.
-
03-01-2012, 06:46 AM #3
- Join Date
- Feb 2012
- Answers
- 66
The main disadvantage of macros is that it increases the size of the program because the pre processor will replace all the macro names by its actual definition before compiling the program.Hence it saves the time required to call a function when a function call is made.
-
Sponsored Ads

Reply With Quote





