Possible Duplicate:
Is there a clean way to prevent windows.h from creating a near & far macro?
What's the point of these two defines in Windef.h?
#define far /* nothing */
#define near /* nothing */
I know it has to do with near and far pointers and the fact they're no longer used, but, is it safe to #undef
them, so I can use near
and far
as function and variable names in my code?
Or, should I simply avoid it and never use near
and far
as identifiers?
Don't reuse them. The last thing you need is to have to repeatedly explain to people that they aren't the old-school ornaments.
If it is critical to your app, you might consider using capitalized versions (since identifiers are case sensitive) - the compiler will catch typos when you mess up.
Just accept that this is cruft from the good old days when computers were still made from metal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With