Re: Is this even possible? (don't need solution, just a yes or no)
Syntax in a code snippet you have provided is wrong. I do not know if it was intentional, but your code snippet will not even compile.
If this was intended as a pseudo-code, you should indicate this.
Since you have already revealed a code it should be written as something similar to this:
Code:
//start and end are delivered as function srguments.
int total = 0;
for(int iIndx = start; iIndx <= end; ++iIndx)
{
int total += iIndx;
}
There are only 10 types of people in the world:
Those who understand binary and those who do not.