What is the difference between ifndef and define | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between ifndef and define

14th Dec 2019, 5:20 PM
Amit Kumar
Amit Kumar - avatar
4 Answers
+ 4
"ifndef" is used to, let us say check whether a particular constant is already defined or not. It means "if not defined". "define" actually let's you create it.
14th Dec 2019, 5:26 PM
Avinesh
Avinesh - avatar
+ 3
This is from the C course. https://www.sololearn.com/learn/C/2958/
14th Dec 2019, 5:30 PM
Avinesh
Avinesh - avatar
+ 2
Thanks 👍
14th Dec 2019, 5:31 PM
Amit Kumar
Amit Kumar - avatar
+ 1
Thanks for your answer! Can U provide a code for it?
14th Dec 2019, 5:28 PM
Amit Kumar
Amit Kumar - avatar