title: Create a double pointer (ptr to ptr) to std::pair with boost
body: <p>I have the following code which I want to rewrite to make use of smart pointers:
  I'm struggling to find any decent examples of how to declare, allocate memory and access the double pointer. Can anyone provide an example? I have read that shared_ptr is not the way to go because it uses delete instead of delete[], does shared_array need to be used?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/shared_array.hpp&gt;
  #include &lt;iomanip&gt;
  
  int main(int argc, char**argv) {
      std::pair&lt;int,float&gt; **corrArray;   
      int rows=10;
      int cols=5;
  
      corrArray = new std::pair&lt;int,float&gt;*[rows];
      for(int i=0; i&lt;rows; i++) {
          corrArray[i] = new std::pair&lt;int,float&gt;[cols];
      }
      for(int i=0; i&lt;rows; i++) {
          for(int j=0; j&lt;cols; j++) {
              corrArray[i][j].first = i+j;
              std::cout &lt;&lt; std::setw(3) &lt;&lt; corrArray[i][j].first &lt;&lt; " ";
          }
          std::cout &lt;&lt; "\n";
      }
      for(int i=0; i&lt;rows; i++) {
          delete[] corrArray[i];  
      }
      delete[] corrArray;
      return 0;
  }
  </code></pre>
  
  <p>Edit: corrArray must be declared first (it will be a class member)</p>