Search Results

Search found 1 results on 1 pages for 'brandino'.

Page 1/1 | 1 

  • Changing the value of a macro at run time

    - by BrandiNo
    I'm working in Visual Studio 2010, using C++ code. What I'm trying to do is change the value of a preprocessor directive during run time, not sure if it's possible but i've tried this.. somefile.h static int mValue = 0; #define POO = mValue; ... #if POO 0 //define class methods #else //define class methods differently } main.cpp main() { //Code calls constructor and methods allowed when POO is 0 //Code increments mValue //Code calls constructor and methods allowed when POO is 1 } How can POO be changed so that class objects uses a different implementation of other methods? Or if it's not possible, what's a another approach to this?

    Read the article

1