The difference between #define and const
#2

I've pondered over this myself a few times, because in a numerical context they aren't at all different. The only advantage I can think of using #define is that you can prepend it with a hash sign to turn it into a string. But that doesn't really work out if the number is between brackets (which it is in most cases).
Reply


Messages In This Thread
The difference between #define and const - by Anuris - 29.12.2014, 23:14
Re: The difference between #define and const - by Vince - 29.12.2014, 23:30
Re: The difference between #define and const - by iLuXing - 30.12.2014, 01:55

Forum Jump:


Users browsing this thread: 1 Guest(s)