title: error C2228: left of '.draw' must have class/struct/union
body: <p>ok, I think that the problem is that I haven't initialized the vector
  but I dont know... anyway, I am getting an error saying that this is wrong:</p>
  
  <pre><code>drawable.at(i).draw();
  </code></pre>
  
  <p>with the vector being declared in the header file as:</p>
  
  <pre><code>vector&lt;render*&gt; drawable;
  </code></pre>
  
  <p>its a vector of render pointers as I have a whole bunch of classes that need to be drawn and they are all children of a parent with pure virtual functions in it, is this the wrong way?</p>
  
  <p>btw, to put a child in I used this:
  header:</p>
  
  <pre><code>ShaysWorld * sw;
  </code></pre>
  
  <p>cpp:</p>
  
  <pre><code>sw = new ShaysWorld;
  drawable.push_back(sw);
  </code></pre>
  
  <p>What can I do to fix the left of '.draw' problem?</p>