1

My application saves a few files in specified paths depending on which mode the program is running....that is either debug or release mode...How can I find out through coding that in which mode my program is currently running on? so that I can write the correct if else statement..

Please help me..

I am using VS2005 with C++98..

DeepN
  • 344
  • 2
  • 13

1 Answers1

1

You can use the preprocessor symbols _DEBUG and NDEBUG:

#ifdef _DEBUG
    std::cout << "in debug mode";
#else
    std::cout << "in release mode";
#endif
Community
  • 1
  • 1
m.s.
  • 16,063
  • 7
  • 53
  • 88