I have a couple of biggish for loops which I would like to separate into functions to reduce code duplication.
The only difference between them is the first line of the loop.
One is:
for (int j = 50; j < average_diff; j++) {
The other is:
for (int j = upper_limit; j > lower_limit; j--) {
I have an integer, tb which indicates which one I'd like to use (it has a value of 1 or 2 respectively).
I'm wondering how I might best accomplish this. Is this a good use case for macros?