Is there some way I can do something like this
#if <running on Visual C++ 2005 SP1>
//SP1 code here
#else
//other code here
#endif
Jochen Kalmbach [MVP] - 16 Jan 2007 13:07 GMT
Hi Jonathan!
> Is there some way I can do something like this
> #if <running on Visual C++ 2005 SP1>
> //SP1 code here
> #else
> //other code here
> #endif
Currently I don't see a way...
But: Why do nou need it?
Greetings
Jochen
Jochen Kalmbach [MVP] - 17 Jan 2007 07:12 GMT
Hi Jonathan!
> Is there some way I can do something like this
> #if <running on Visual C++ 2005 SP1>
> //SP1 code here
> #else
> //other code here
> #endif
Yu could use the "_CRT_ASSEMBLY_VERSION" define...
But this only works if you do *not* define "_USE_RTM_VERSION"...
if (strcmp(_CRT_ASSEMBLY_VERSION, "8.0.50727.762") == 0)
_tprintf(_T("SP1\n"));
else
_tprintf(_T("RTM\n"));
Greetings
Jochen