P
pauldepstein
To help me debug, I am writing a lot of information into a stream which
I call debug.
However, because of the large amount of time taken to print this
information, I only want this printed while I am in debugging mode as
indicated by a preprocessor directive:
#define DEBUG
In other words, I need code which says "Whenever I write debug <<
...... I only want that command executed if I am in debug mode. "
In other words, I want code that always interprets statements of the
form:
debug << x << endl;
as #ifdef DEBUG debug << x << endl; (without typing #ifdef DEBUG
each time.)
So how do I do this? Is there some command that says "Open a stream
for debug mode only?"
Thank you,
Paul Epstein
I call debug.
However, because of the large amount of time taken to print this
information, I only want this printed while I am in debugging mode as
indicated by a preprocessor directive:
#define DEBUG
In other words, I need code which says "Whenever I write debug <<
...... I only want that command executed if I am in debug mode. "
In other words, I want code that always interprets statements of the
form:
debug << x << endl;
as #ifdef DEBUG debug << x << endl; (without typing #ifdef DEBUG
each time.)
So how do I do this? Is there some command that says "Open a stream
for debug mode only?"
Thank you,
Paul Epstein