title: Returning a list of objects
body: <p>I am writing a function that will return a list (or a vector- not sure about that yet) of objects, and I am wondering how to implement it.</p>
  
  <p>At first I thought something along like:</p>
  
  <pre><code>int getVector(ObjectVectorType MyVector, some other arguments here);
  </code></pre>
  
  <p>Then I thought,. ummm maybe </p>
  
  <pre><code>ObjectVectorType getVector(int *nElementsOfVector, some other arguments here);
  </code></pre>
  
  <p>But then I remember, that a vector type has <code>size()</code> so maybe it is not even necessary to get the number of elements the first time... maybe size does not take much time...</p>
  
  <p>Any advice on this , before i start coding?</p>
  
  <p>Thanks</p>