title: char pointer to pointer
body: <p>I am trying to see to get around pointer to pointers. I am confused with this</p>
  
  <pre><code>int syntax_error(int num) {
     cout &lt;&lt; num &lt;&lt; endl;
     static char *err[] = {
          "Cannot open\n",
          "I can open\n",
          "Sorry\n",
          "Thank you\n"
      　};
  
      printf("%s", err[num]);
  
      cout&lt;&lt;"&amp;err[num][1]"&lt;&lt;" "&lt;&lt;&amp;err[num][1]&lt;&lt;endl;
      cout&lt;&lt;"&amp;err[num]"&lt;&lt;" "&lt;&lt;&amp;err[num]&lt;&lt;endl;
      cout&lt;&lt;"err[num][1]"&lt;&lt;" "&lt;&lt;err[num][1]&lt;&lt;endl;
      cout&lt;&lt;"*err[num]"&lt;&lt;" "&lt;&lt;*err[num]&lt;&lt;endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Say num = 3. Then the following outputs were produced</p>
  
  <pre><code>   Thank you
     &amp;err[num][1] hank you
     &amp;err[num] 0x8049ca4
     err[num][1] h
     *err[num] T
  </code></pre>
  
  <p>I read that the <code>&amp;</code> operator refers to the address of the pointer to which it refers to. Here should it not return the address of err[num][1] rather than what is stored from there till end. On the other hand, <code>&amp;[num]</code> is returning the address. I am confused here. It would be greatly appreciated if someone could help.</p>
  
  <p>Question re edited:
   <code>&amp;</code> operator should refer to the address. So <code>&amp;err[num][1]</code> should return an address. Here it gave the string starting from <code>err[3][1]</code>. On the other hand <code>&amp;err[num]</code> returns an address. So why this mix up</p>