FROM : Sherm Pendley
DATE : Wed Jul 26 20:47:00 2006
On Jul 26, 2006, at 2:37 PM, 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];
You want to declare roller as an id, not as a pointer to an id:
id roller;
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
DATE : Wed Jul 26 20:47:00 2006
On Jul 26, 2006, at 2:37 PM, 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];
You want to declare roller as an id, not as a pointer to an id:
id roller;
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

