Why not just change it to
int foo(int x, y)
{
if (y == 0)
throwException("Doh!");
return x/y;
}
This gives the same runtime results, and the compiler won’t complain.
Why not just change it to
int foo(int x, y)
{
if (y == 0)
throwException("Doh!");
return x/y;
}
This gives the same runtime results, and the compiler won’t complain.