c++ - how to Ignore definitions (VS2008) -


I have some source code that I want to compile with VS 2008 but I have many errors which I have to fix . Now something like this is:

  enum {background = 0x00000001, WEAPON = 0x00000002, TRANSPARENT = 0x00000004}  

The problem is that TRANSPARENT is defined WinGDI.h

Transparent 1

This would be a compilation error:

  Error C2143: Syntax Error: Before 'continuous' is disappearing '}'  

To correct this error, delete the field without enum and WinGDI It is possible to rename without

You can use

  #undef TRANSPARENT  

but due to errors There may be other reasons, if WinGDI transients are used later, the solution may be a (messy) solution:

  #ifdef TRANSPARENT #define _TRANSPARENT TRANSPARENT #undef TRANSPARENT #ENDIF  

and after your code:

  #ifdef _TRANSPARENT #transportant _TRANSPARENT #endif  
Define

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -