Re: Is This Right?
Re: Is This Right?
- Subject: Re: Is This Right?
- From: "Don Arbow" <email@hidden>
- Date: Tue, 5 Jun 2001 13:10:01 -0700
>
Do I understand this right? Can these two lines of code:
>
NSMutableArray *myArray;
>
myArray = [[NSMutableArray alloc] init];
>
be combined thus:
>
NSMutableArray *myArray = [[NSMutableArray alloc] init];
Sure, the C language allows you to combine a variable declaration with an
initializer. The above is just as valid as this:
int myVar = 5;
But make sure that all of your declarations are at the top of the function.
Don