title: C++: How to pass array of objects into function?
body: <p>I have a pointer to array of objects. It looks like:</p>
  
  <pre><code>MyClass *myClass[ 10 ];
  myClass[ 0 ] = new MyClass(); // init for each of myClass[0..9]
  myClass[ 0 ]-&gt;field1 = "hello";
  </code></pre>
  
  <p>How can I pass "myClass" to a function by reference? I tried a few cases but it didn't work.</p>