0
首先对不起我的英语我该如何解决这个错误?
我已经与我的代码有问题,我尝试做一个完善的计划,但在我的代码出现此错误:
Invalid operands to binary expression ('CFURLRef' (aka 'const struct __CFURL *') and 'CFURLRef')
,这是我的全部代码:
- (IBAction)tocar:(id)sender {
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundfileURLRef;
soundfileURLRef *CFBundleCopyResourceURL (mainBundle, (CFStringRef) @"Botao", CFSTR ("mp3"), NULL);
UInt32 SoundID;
AudioServicesCreateSystemSoundID(soundfileURLRef, &SoundID);
AudioServicesPlaySystemSound(SoundID);
}
谢谢,它的工作。 – Bueno