How to write recursive function with #define | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

How to write recursive function with #define

In lessons there was an area function was declared with #define How to make a a condition and recursive with #define

7th Dec 2018, 8:03 AM
ABADA S
ABADA S - avatar
2 Answers
+ 3
#define performs string substitution prior to the compiler getting the code. Attempting to perform recursion would fail as the substitution would be performed infinitely never reaching the compiler.
7th Dec 2018, 3:21 PM
John Wells
John Wells - avatar
+ 5
Thanks master I got it
8th Dec 2018, 12:04 AM
ABADA S
ABADA S - avatar