devxlogo

Use a Macro to Improve Your Debug Output

Use a Macro to Improve Your Debug Output

Frequently, and especially during development and debugging, you want to write out the values of a variable. To distinguish these variables, label them by putting this directive in:

#define PUTOUT(x) cout

Then, inside the code, put:

PUTOUT(Variable);PUTOUT(Variable_2);    

devx-admin

Share the Post: