title: How does one create iterateable lists of objects in C++?
body: <p>I'm starting out C++ coming from Python, so I'm pretty much just scrolling through the basics. Problem occurs when I try to make an array with objects in it. In Python I would have a class Car with the attributes <code>color</code> and <code>year</code>:</p>
  
  <pre><code>myCars = [Car("Red", 1986), Car("Black", 2007), Car("Blue", 1993)]
  # and then going through the cars:
  for car in myCars:
  print("The car has the color " + car.color + " and is " + (2014 - car.year) + " years old.")
  </code></pre>
  
  <p>Trying to do something similar in C++:</p>
  
  <pre><code>struct Car {
      string color;
      int year;
  };
  
  int cars[3] = {Car cars[0], Car cars[1], Car cars[2]}
  //EDIT: I wrote bilar but I meant cars.
  </code></pre>
  
  <p>but it is indeed uninteresting to iterate over these cars, as for one, this doesn't work, and secondly, they doesn't have any attributes. I just don't understand, I think maybe I've missed something important and got it all wrong, but then, I reckon I just gotta have this explained clean and nice.</p>