| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Mon, Jun 18, 2001 at 02:53:24PM -0400, Andre John Mas wrote:I have just been following the tutorial in the "Learning Cocoa" book and
had problems with the follow code:
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSMutableArray *myArray = [[NSMutableArray alloc] init];
[myArray addObject: @"Here's a string"];
int itemCount;
The problem is here. You need to declare your variables at the beginning of a block in C (and thus in Objective C as well).
Move int itemCount;
| References: | |
| >Re: Objective C and gcc problems (From: "Daniel J. Luke" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.