Compiler Error (expected expression before 'NSArray')
Compiler Error (expected expression before 'NSArray')
- Subject: Compiler Error (expected expression before 'NSArray')
- From: jeremy <email@hidden>
- Date: Mon, 15 Feb 2010 11:08:03 -0500
Why does the following code cause the compiler error "expected expression before 'NSArray'"?
----
int i = 0;
switch (i) {
case 0:
NSArray *results;
break;
default:
break;
}
----
Why does the following produce no compiler error, with the addition of curly braces?
----
int i = 0;
switch (i) {
case 0:
{
NSArray *results;
}
break;
default:
break;
}
----
If I comment out the curly braces, the compiler once again reports the error "expected expression before 'NSArray'". Where is the problem expression? Why do I get the compiler error?
----
int i = 0;
switch (i) {
case 0:
// {
NSArray *results;
// }
break;
default:
break;
}
----
Using
XCode 3.2.1
Active SDK: Max OS 10.6 (Base SDK)
Active Architecture: x86_64
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden