View Single Post
Old 08-28-2005, 05:37 AM   #14 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
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;
}
__________________
Valmont is offline   Reply With Quote