¡@

Home 

2014/10/15 ¤U¤È 10:04:48

iphone Programming Glossary: bytedata

How to convert NSData to byte array in iPhone?

http://stackoverflow.com/questions/724086/how-to-convert-nsdata-to-byte-array-in-iphone

a byte array so I write the following code NSData data NSData dataWithContentsOfFile filePath int len data length Byte byteData len byteData data bytes But the last line of code pops up an error saying incompatible types in assignment . What is the.. so I write the following code NSData data NSData dataWithContentsOfFile filePath int len data length Byte byteData len byteData data bytes But the last line of code pops up an error saying incompatible types in assignment . What is the correct way.. c bytearray type conversion share improve this question You can't declare an array using a variable so Byte byteData len won't work. If you want to copy the data from a pointer you also need to memcpy which will go through the data pointed..