我有这样的代码:
NSData *data = [NSData dataWithContentsOfURL:objURL]; const void *buffer = [data bytes]; [self _loadData:buffer]; [data release];
"_loadData"函数采用如下参数:
- (void)_loadData:(const char *)data;
如何在Objective-C上将"const void "转换为"const char "?
就像你在C中一样:
[self _loadData:(const char *)buffer];
应该管用.