title: A pointer to an array of pointers
body: <p>I know I should know this, but it's late and my brain just won't put the pieces together.</p>
  
  <p>This is as straight forward as a question can get:</p>
  
  <p>I have a struct <code>item</code>. I want to create a pointer to an array of pointers to that item type.</p>
  
  <p>Eg.</p>
  
  <pre><code>struct item {
      int data;
      string moreData;
  };
  </code></pre>
  
  <p>I want to have an <code>ArrayPointer</code> that point's to an array. I want that array to contain in each element a pointer to an item.</p>
  
  <p>How do I do this in C++, or more sepcifically where do I need to put how many dereferencing operators? I know how to declare basic (single indirection) pointers and am pretty fluent in their use.</p>
  
  <p>I need information for the following steps if at all possible:</p>
  
  <p>Declaring the <code>ArrayPointer</code>.</p>
  
  <p>Initializing the <code>ArrayPointer</code> with a size s.</p>
  
  <p>Initializing each element of <code>ArrayPointer</code> with <code>new item</code>.</p>
  
  <p>eg: </p>
  
  <pre><code>for(int i = 0; i &lt; s; i++)
      ArrayPointer[i] = // a new item
  </code></pre>
  
  <p>I feel like as soon as someone posts an answer I'm going to facepalm so hard I break my nose. </p>