The watch
macro is one of the most useful tricks ever.
#define watch(x) cout << (#x) << " is " << (x) << endl
If you’re debugging your code, watch(variable);
will print the name of the variable and its value. (It’s possible because it's built during preprocessing time.)