title: creating 2-d array of objects with a constructor with a parameter
body: <p>I'm trying to create a 2-d array of objects. I'm trying to set the constructor of the class I made equal to a constructor that will take in a parameter. However, I keep getting an error saying: </p>
  
  <p>main.cpp:18:37: error: invalid user-defined conversion from 'test*' to 'const test&amp;'</p>
  
  <pre><code>int main()
  {
    test arr[9][9];
    char s[9][9];
    int integerArray[9][9];
    for(unsigned int i = 0; i &lt; 9; i++)
    {
      for(unsigned int j = 0; j &lt; 9; j++)
      {
        cin &gt;&gt; s[i][j];
        arr[9][9] = new test(s[i][j]);
      }
    }
    return 0;
  }
  </code></pre>
  
  <p>With test being the class. Can anyone help me figure out this error? I understand that the new function returns a void pointer but how can I get it so that my 2d array takes in the parameter?</p>
  
  <p>Thanks.</p>