Ok, so I have some code from my HugeInteger problem again. Like the title says this is totally backwards. I keep getting the exact wrong result than what should be given. I could probably sneek by the graders with it, but now it is really got me wondering. When I print out my array it is not zero, but the is zero line keeps printing unless I change the two cout statements around. Weird or just me?
f.isZero();
if (false)
cout << "The huge integer is not zero." << endl;
else
cout << "The huge integer is zero." << endl;
//The actual funtion I wrote is below.
bool HugeInteger::isZero()
{
for (int i=0; i<40; i++)
{
if ( digits[i] != 0 )
return false;
}
return true;
}