I trying to do conversions between Binary, Octal, Decimal and Hexadecimal in Objective-C. I had problems converting Octal to Decimal.
I have tried the following:
NSString *decString = [NSString stringWithFormat:@"%d", 077];
It works fine, returning 63 as expected, but my Octal value is a NSString. How can I tell the computer that it is a Octal;
I know there is a method called "scanHexInt:" which I used to convert Hexadecimal to decimal, but it seems there is no scanOctInt...
Any help would be appreciated!