nancytan
asked on
Different base class for debug & release
VC5, WinNt4.0
I would like to do the following. How can i code it?
I have a CClassC.
In debug setting, i want its base class to be CClassA.
In release setting, i want its base class to be CClassB.
CClassB is derived from CClassA.
I would like to do the following. How can i code it?
I have a CClassC.
In debug setting, i want its base class to be CClassA.
In release setting, i want its base class to be CClassB.
CClassB is derived from CClassA.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do i code if i also want in the debug mode to skip
certain functions. These functions are to be
processed during the Release setting only.
certain functions. These functions are to be
processed during the Release setting only.
same way ... use the pre-processor with #ifdef _DEBUG/#else/#endif
You can make the release and debug versions as different as you want .. they could be completely different programs if you like .. but that may not help you much :-)
You can make the release and debug versions as different as you want .. they could be completely different programs if you like .. but that may not help you much :-)
#define BASE CClassA
#else
#define BASE CClassB
class CClassC : public BASE {
...
};