I am learning Objective C . I was given a code to fix that I have fixed but not entirely sure what was going on though. Can some please explain what is following code doing.
//in header file there is this line
@property (retain) NSMutableArray *anArray;
// In implementation file in a method
self.anArray = [NSMutableArray array];
//This assigns a large value to index . What is this value. Does NSIteger needs initialization I think default is 0
NSInteger _nextIndex = (NSInteger)[self.anArray];
You’re typecasting the pointer pointing to
self.anArrayto anNSInteger. In other words,_nextIndexcontains the address at whichself.anArrayis stored.