Hi All,
I tried to add NSInteger into my NSMutableArray and it's writing a warning
the code is
.h File
.m File
what is the problem?
Thanks
I tried to add NSInteger into my NSMutableArray and it's writing a warning
the code is
.h File
Code:
NSMutableArray *CellsNumber;
NSInteger *Number;
.m File
Code:
CellsNumber = [[NSMutableArray alloc] init];
NSInteger *myInt;
myInt=(arc4random()% 50);
for(int i = 0 ; i <[CellsNumber count] ; i++) {
Number=[CellsNumber objectAtIndex:i][COLOR="blue"]warning: assignment from incompatible pointer type[/COLOR]
if(myInt==Number) [COLOR="blue"]warning: comparison between pointer and integer[/COLOR]
myInt=(arc4random()% 50);
}
[CellsNumber addObject:myInt]; [COLOR="blue"]warning: passing argument 1 of 'addObject:' makes pointer from integer without a cast[/COLOR][/QUOTE]
what is the problem?
Thanks