+ 3

can we use all macros in cpp,like #define

29th Mar 2017, 12:30 PM
shivajiuser@
shivajiuser@ - avatar
2 Answers
29th Mar 2017, 3:13 PM
Hatsy Rei
Hatsy Rei - avatar
+ 3
yes you can, but inline functions and template function are better options over macros. 1. Inline functions ensure datatype binding. 2. Template functions facilitate generic programming.
29th Mar 2017, 12:39 PM
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender)
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender) - avatar