PDA

View Full Version : what's wrong?! (c++)




chris200x9
Oct 31, 2007, 07:13 PM
whats wrong with this function


double CalculateShippingCharges( int pounds, int ounces )
{

while (ounces >= 16)
{
pounds++;

ounces - 16;
}
cout << pounds;
cout << ounces;

return 0;
}



when I invoke it in main and run it instead of having any output it just says program exited normally



chris200x9
Oct 31, 2007, 07:20 PM
actually it just says session started and then doesnt end

chris200x9
Oct 31, 2007, 07:24 PM
omfg I'm retarded ok ignore this thread

pilotError
Oct 31, 2007, 07:59 PM
could it be:


ounces -= 16;