command line debug option?

I am making a larger project program and need to have a program wide debug option enabled on the command line. I want to have a series of

#ifdef DEBUG
#endif DEBUG

and I know I can have DEBUG enabled via g++ -DDEBUG, but it sounds like I may need to do it via

./project3 DEBUG

I am having a brain fart on how to have that argv[1] define DEBUG so I can use it in the #ifdefs....can anyone guide me?
Um, you can't. #ifdefs are compile-time directives. Parsing argv[] is runtime.

Topic archived. No new replies allowed.