My favorite print debugging method in C++.

c-plus-plus print-debug

I use predefined macros frequently for print debugging in C++,

cout << .... some state info ....
cout << "In " << __FILE__ << " at line " << __LINE__ << endl;

Gnu GCC docs, predefined macros.

© Amy Tabb 2018 - 2023. All rights reserved. The contents of this site reflect my personal perspectives and not those of any other entity.