gpt4 book ai didi

objective-c - 预期表达式之前...在 Switch 语句中

转载 作者:太空狗 更新时间:2023-10-30 03:31:18 26 4
gpt4 key购买 nike

<分区>

我在这段代码中遇到编译错误:

switch(event) {
case kCFStreamEventHasBytesAvailable:
UInt8 buf[BUFSIZE];
CFIndex bytesRead = CFReadStreamRead(stream, buf, BUFSIZE);
if (bytesRead > 0) {
handleBytes(buf, bytesRead);
}
break;
case kCFStreamEventErrorOccurred:
NSLog(@"A Read Stream Error Has Occurred!");
case kCFStreamEventEndEncountered:
NSLog(@"A Read Stream Event End!");
default:
break;
}

UInt8 buf[BUFSIZE]; 导致编译器提示“Expected expression before UInt8” 为什么?

谢谢!

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com