what's wrong?! (c++)

Discussion in 'Mac Programming' started by chris200x9, Oct 31, 2007.

  1. macrumors 6502a

    Joined:
    Jun 3, 2006
    #1
    whats wrong with this function

    Code:
    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
     
  2. thread starter macrumors 6502a

    Joined:
    Jun 3, 2006
    #2
    actually it just says session started and then doesnt end
     
  3. thread starter macrumors 6502a

    Joined:
    Jun 3, 2006
  4. macrumors 68020

    pilotError

    Joined:
    Apr 12, 2006
    Location:
    Long Island

Share This Page