|
-
May 28th, 2009, 02:05 PM
#1
Are #defines evil?
I tried to compile a class with:
static const int ERROR = 0;
seems harmless enough, but I get an error:
error C2059: syntax error : 'constant'
on digging deeper, I see the following definition in :
c:\program files\microsoft visual studio 8\vc\platformsdk\include\wingdi.h
#define ERROR 0
If I rename my static data member to MY_ERROR, then the problem goes away?
Am I to conclude that all the # defines in the various windows headers have polluted the namespace? What gives?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|