is it necessary use return data type when define a function in preprocessor directive? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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 ответов
+ 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