Hello,
VS 2008
I have the following code
#define PROC_ADD
void main(void)
{
while(1)
{
#ifdef PROC_ADD
// Do this code here then undefined it to run the code in the else
// processing work
#undef PROC_ADD
#else
// now that PROC_ADD has been undefined run this code
// processing work
#endif
}
}
However, it will run the code. But it won't run the code in the else
after the PROC_ADD
has been undefined.
I think the reason could be that you can only define and undefine at compile time, and not at run-time. However, I am not really sure.
Many thanks for any suggestions,