title: Accessing element of an array of struct.
body: <p>So I have an struct</p>
  
  <pre><code>struct car{
     string ownerName;
     float price;
     int year;
  };
  </code></pre>
  
  <p>and I declared an array of these structs
     car *cars = new car[1000]
  Each car has an index, for example, the car with index 0 has name John Smith.</p>
  
  <p>So, my question is knowing the name of the owner how do I access the index of the car. I know that the other way i would write 
        cars[0].name, 
  to get the name, but how would i do it backwards?</p>