Hi,
I need to learn how to convert from an NSString to a double.
Thanks for helping me.
-- Kaydell
I need to learn how to convert from an NSString to a double.
Thanks for helping me.
-- Kaydell
Code:
- (double) getCost {
NSString *string = @"2.0";
NSScanner *scanner = [NSScanner scannerWithString: string];
double *cost = [scanner scanDouble]; <<< this gives me the warning: that 'NSScanner' may not respond to -scanDouble
return *cost;
}