My first post.
I have a little problem with the first for loop of chapter 19.
I understand how the loop generates 10 employee objects with different instance variable settings and that they’re added to the employees array. The difficulty I have is, how can each object have a pointer with the same name i.e. “person”, how would you access one of the instance variables of any of the employee objects i.e. employeeID with out accessing the array? For example if I insert the line
NSLog(@“person ID = %d”,[person employeeID]);
straight after the loop I have an error, which I would expect because how can the complier know which person I’m referring to.