0

NSData を のようなものに変換する必要がありunsigned char b[16]ます。これは私がこれまでに持っているものです。

NSData *c = [@"testingsomething" dataUsingEncoding:NSUTF8StringEncoding];
unsigned char *a = (unsigned char *)[c bytes];
NSLog(@"size of a is %ld", sizeof(a));
unsigned char b[16] = "testingsomething";
NSLog(@"size of b is %ld", sizeof(b));

私が得る出力は次のとおりです。

size of a is 4
size of b is 16

これどうやってするの?助けていただければ幸いです。

4

1 に答える 1