title: Objective-C: Accessing Member Objects that are in an array?!? I think
body: <p>Totally new to Obj-C, so thanks for patience. :P</p>
  
  <p>Because I'm beginner, I will use the car example. Easier for me to understand.</p>
  
  <p>I have an object, Car. It has two member objects, tire and engine.</p>
  
  <p>Tire and engine have their own member variables too, but they are just int with various names (like pressure, treadDepth).</p>
  
  <p>In all these cases, I have synthesized accessor methods. I'm not sure about accessor methods for objects, so I just did @property id engine / @property id tire. Hope that is right!</p>
  
  <p>Now, I can do dot.notation style to access like: [car.engine cylinders]. Fine! Sending tire and engine messages works fine. I write methods, this notation seems to work.</p>
  
  <p>But when I declare an array of objects like 4 tires for the car:</p>
  
  <pre><code>@interface Car : NSObject {
       tire *tires[4];
  }
  </code></pre>
  
  <p>I cannot send it message like this </p>
  
  <pre><code>[car.tire[0] setPressure: int];
  </code></pre>
  
  <p>It says accessing unknown tires getter method.</p>
  
  <p>Basically I am wondering if someone can help me understand how to correctly access member variables of an object that is in an array.</p>
  
  <p>Thanks!</p>