0

somebody help,I tried whold afternoon and could't find the method to do this.

welsonla
  • 328
  • 3
  • 15
  • Possible duplicate: http://stackoverflow.com/questions/2035421/creating-nsdecimal http://stackoverflow.com/questions/2449422/how-do-i-add-nsdecimalnumbers – Totumus Maximus Oct 25 '11 at 09:27

1 Answers1

1

NSDecimal is a C-struct with private members, you would usually create one from the Objective-C class NSDecimalNumber (decimalValue).

However, using NSDecimal directly is rarely needed, dealing with NSDecimalNumber is much easier. You can use the decimalNumberByAdding: method instead of the NSDecimalAdd function.

omz
  • 53,243
  • 5
  • 129
  • 141