Possible Duplicate:
Inline functions vs Preprocessor macros
what is concept of Inline function and how it is differ from macro?
inline unsigned int getminutes( unsigned int seconds ) { return( seconds / 60 ); } #define GetMinutes(seconds) (seconds) / (60) To be honest I'd ask which one is faster, but I've seen so much on S.O that asking which one is better would grant me me knowledge. (Yes! I'm a knowledge hunter)
const unsigned minutes = seconds / 60;. It is not that the factor60is hard to understand ("magic number") or likely to change during the lifetime of the program.