Re: NSData hexadecimal to 16 bit integer?
Re: NSData hexadecimal to 16 bit integer?
- Subject: Re: NSData hexadecimal to 16 bit integer?
- From: Andreas Monitzer <email@hidden>
- Date: Sat, 28 May 2005 13:16:29 +0200
On May 28, 2005, at 11:55, Nick Morris wrote:
-------- Code --------
NSData *theFileData = [NSData dataWithContentsOfFile:aValidFlePath];
NSData *theData = [NSData dataWithData:[theFileData
subdataWithRange:NSMakeRange(0,2)]];
NSLog(@"%@", theData);
-------- End Code --------
The dumb question is.....
How do I convert 'theData', i.e. docf, to an integer (53455).
NSLog(@"%d",*(int*)[theData bytes]);
andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden