I am getting a compilation error in this block of code:
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;
}
The line UInt8 buf[BUFSIZE];
is causing the compiler to complain "Expected expression before UInt8" Why?
Thanks!