title: 2D array help in C++
body: <p>So I made my own class in order to hold a 3D vertex. That basically looks like:</p>
  
  <pre><code>class Vertex                                    // Vertex Class
  {
  public:
      float x;                                // X Component
      float y;                                // Y Component
      float z;                                // Z Component
  
      float getX() {
          return x;
      }
      float getY() {
          return y;
      }
      float getZ() {
          return z;
      }
  };
  </code></pre>
  
  <p>Now I need to make a 2D array of these but when I initialize it it won't work. Basically each row will be a face of a polygon. And each column will contain a vertex of that row. So if one row is</p>
  
  <p>(0,0,0) (1, 1, 1) (3, 3, 3) (4,4,4);</p>
  
  <p>Then that row will represent a face with vertices (0,0,0) (1, 1, 1) (3, 3, 3) (4,4,4);</p>
  
  <p>Now when I try to initialize it using </p>
  
  <pre><code>Vertex faces = new Vertex[num_faces][4];
  </code></pre>
  
  <p>It work work. This seems pretty simple so what am I doing wrong?</p>
  
  <p>EDIT: I changed it to</p>
  
  <pre><code>Vertex *faces = new Vertex[num_faces][4];
  </code></pre>
  
  <p>and I get this error:</p>
  
  <p>cannot convert from 'Vertex (*)[4]' to 'Vertex *'</p>