Further to Barry's suggestion to use a print before each return, note that
you can use the predefined macro LINE to display the source code line
number. So code such as:
std::cout << __LINE__ + 1 << '\n';
return n;
will display the source line number of the return statement.
If you don't want to clutter up the stdout display with these line numbers,
or if you don't have a console attached to your program, you can use
OutputDebugString (OutputDebugStringA, OutputDebugStringW) to show the
line numbers in the Output Window of the Debug session.
- Wayne