Skip navigation.
 
mlRe: (no subject)
FROM : David Emme
DATE : Wed Jul 26 20:46:43 2006

On Jul 26, 2006, at 11:37 AM, Brad Bumgarner wrote:

> In the following code I get a warning at the line indicated with 
> the arrow ("--->"). The warning is:
>
> "warning: assignment from incompatible pointer type."  I thought 
> using an "id" declaration would avoid this kind of thing.
>
>
> -(NSArray *)shiftObjectsInArray: (NSMutableArray *)anArray {
>     int        x;
>     id        *roller;
>     
>     if ([anArray count] > 0) {
> --->        roller = [anArray lastObject];



What you want to say in your declaration is "id", not "id *".

-Dave
--
I started out with nothing, and I still have most of it.

Related mailsAuthorDate
ml(no subject) Brad Bumgarner Jul 26, 20:37
mlRe: (no subject) Henry McGilton Jul 26, 20:43
mlRe: (no subject) David Emme Jul 26, 20:46
mlRe: (no subject) Brad Bumgarner Jul 26, 20:48
mlRe: (no subject) j o a r Jul 26, 21:14