Quote:
|
you shouldn't count pairs of elements with themselves.
|
The postcondition was set (in blue). We don't know what the reason is. So don't change it.
Quote:
|
I didn't set ep to 0 because you never read from it.
|
Agreed!
Quote:
|
since certain dodgy compilers (like MSVC6) extend the scope of "i" to the entire function even if you do declare it within the for-loop.
|
Good point but you can circumvent this problem whilst keeping the portability by explicity scoping:
Code:
void my_function()
{
{//scope start
for(int i = 0;; i++)
{
}
}//scope end;
}