title: Pointer to pointer memory allocation, why is this wrong?
body: <p>I am just trying to get my head around various pointer concepts and I have the following code:</p>
  
  <pre><code>char** a = new char*; // assign first pointer to point to a char pointer
  
      char b[10] = "bla bla";
      *a = new char; //assign second pointer a block of memory.  -&gt; This looks wrong to me!!  
      (**a) = b[2]; 
  </code></pre>
  
  <p>So what is wrong with the second 'pointer' memory allocation? It runs and stuff, but it just feels wrong.</p>
  
  <p>EDIT:</p>
  
  <p>Thanks for clarifying this! I learnt something!</p>