Why I get errors when I try to out a compiler defined macro using a pragma message?
- by bogdan
I would like to know why the Visual C++ compiler gets me an warning/error if I use the following code:
#pragma message( "You have " _MSC_FULL_VER )
Here is what I get:
error C2220: warning treated as error - no 'object' file generated
warning C4081: expected ':'; found ')'
The problem reproduces for _MSC_FULL_VER or _MSV_VER but not if I try to use others like __FILE__ or __DATE__.
These macros are defined, they are documented on msdn