title: How to access twodimensional array
body: <p>I have a graph, which is represented by a two-dimensional array:</p>
  <pre><code>int graph[9][9] = { {INFINITY, 4, INFINITY, INFINITY, INFINITY, INFINITY, INFINITY, 8, INFINITY},
                          {4, INFINITY, 8, INFINITY, INFINITY, INFINITY, INFINITY, 11, INFINITY},
                          {INFINITY, 8, INFINITY, 7, INFINITY, 4, INFINITY, INFINITY, 2},
                          {INFINITY, INFINITY, 7, INFINITY, 9, 14, INFINITY, INFINITY, INFINITY},
                          {INFINITY, INFINITY, INFINITY, 9, INFINITY, 10, INFINITY, INFINITY, INFINITY},
                          {INFINITY, INFINITY, 4, 14, 10, INFINITY, 2, INFINITY, INFINITY},
                          {INFINITY, INFINITY, INFINITY, INFINITY, INFINITY, 2, INFINITY, 1, 6},
                          {8, 11, INFINITY, INFINITY, INFINITY, INFINITY, 1, INFINITY, 7},
                          {INFINITY, INFINITY, 2, INFINITY, INFINITY, INFINITY, 6, 7, INFINITY} };
  </code></pre>
  <p>This graph is passed into my class as an <strong>int*pointer</strong> like this</p>
  <pre><code>dijkstra::dijkstra(int* grapharray, int number_nodes)
  {
      this-&gt;grapharray = grapharray;
      this-&gt;number_nodes = number_nodes;
  }
  </code></pre>
  <p>In order to access the array i have made a variable</p>
  <p><code>int** graph=&amp;grapharray;</code></p>
  <p>which allows me to access</p>
  <pre><code>graph[0][2]
  graph[0][5]
  </code></pre>
  <p>and so on but not</p>
  <pre><code>graph[1][7]
  </code></pre>
  <p>How can i access the graph in both dimensions?</p>