is it necessary use return data type when define a function in preprocessor directive? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

is it necessary use return data type when define a function in preprocessor directive?

# define getmax(a, b) (a>b ? a : b) can specific return data type like follow code that display error. # define int/double/any type getmax(a, b) (a>b ? a : b)

7th Apr 2019, 11:09 AM
Alireza Abbasi
Alireza Abbasi - avatar
3 Answers
+ 1
That is a great question and im interested in the answer too.
7th Apr 2019, 11:12 AM
Dragonxiv
Dragonxiv - avatar
+ 1
thanks guys.
7th Apr 2019, 11:44 AM
Alireza Abbasi
Alireza Abbasi - avatar