Re: NSString intValue
Re: NSString intValue
- Subject: Re: NSString intValue
- From: Andrew Pinski <email@hidden>
- Date: Tue, 12 Aug 2003 10:54:58 -0400
On Tuesday, Aug 12, 2003, at 10:44 US/Eastern, Andreas Nfsby Rasmussen
wrote:
Hi,
Something quite trivial which is starting to annoy me. I have a
NSString containing for example "1234", which I want to turn into an
int.
I fail to see why the following doesn't work but it always crashes
with ... exited due to signal 10 (SIGBUS)
NSString *test = @"1234";
NSLog(@"test: %@", [test intValue]);
Try NSLog(@"test: %d", [test intValue]); instead as -[ intValue]
returns an int not an object.
Andrew
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.