Re: Weird build error
Re: Weird build error
- Subject: Re: Weird build error
- From: Wayne Packard <email@hidden>
- Date: Thu, 17 Apr 2008 16:13:20 -0700
The break isn't required, but something is. You could put
NSLog(@"defaulting"); after default:. Or you could put a semicolon; or
a lovely set of empty braces.
To fix the other problem, try this:
switch (1) {
case 1:
{
NSMutableArray *myArray=[[NSMutableArray alloc] init];
}
break;
default: ;
}
Changing the file extension from .m to .mm would also likely work.
Wayne
On Apr 17, 2008, at 3:56 PM, Don Arnel wrote:
A break; is not required, but it does cause the compound statement
error to go away. Even with the break; inserted the other error
still occurs if the comments are removed.
On Apr 17, 2008, at 6:50 PM, Robert Kukuchka wrote:
you forgot the break;
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden