title: error: cannot increment value of type 'char [6]'
body: <p>I am trying to learn pointers and string literals in C/C++.
  As per my understanding, string literals are char arrays with a null <code>\0</code> at the end. Also we can basically do all the pointer arithmetic operations on array like increment and decrement. </p>
  
  <p>But when I am trying to run the following code:</p>
  
  <pre><code>#include &lt;iostream&gt; 
  using namespace std;
  
  int main (){
      char *c ="Hello";
      char d[6];
  
      while(*d++ = *c++);
  
      cout&lt;&lt;c&lt;&lt;endl&lt;&lt;d;
  } 
  </code></pre>
  
  <p>I am getting the following error,</p>
  
  <pre><code>error: cannot increment value of type 'char [6]'
      while(*d++ = *c++);
  </code></pre>
  
  <p>My assumption for this code was, that the values of <code>string literal c</code> will be copied to <code>char array d</code>.</p>
  
  <p><strong>Edit:</strong>
  Now I am a bit confused about the difference between these 2 statements:</p>
  
  <pre><code>*(d++)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>*(d+1)
  </code></pre>
  
  <p>assuming <code>d</code> is an array. </p>