title: Assigning char array to pointer
body: <p>I am trying to understand <strong>pointers</strong> in C++, but I am currently confused with the following:</p>
  
  <pre><code>char input_line[] = "hi?";
  char* p;
  p = &amp;input_line;
  
  while (*p)
  {       
      cout &lt;&lt; *p &lt;&lt; endl;
      *p++;
  }
  </code></pre>
  
  <p>I must be confused here because I would think this says assign the address of a <strong>1d array</strong> to the <strong>pointer</strong>; however, when I try to compile this, I get an error:  <code>error: cannot convert char (*)[4]' to 'char*' in assignment p = &amp;input_line;</code></p>
  
  <p>It looks like I should be doing this:</p>
  
  <pre><code>const char input[] = "test?";
  int quest_count = 0;
  const char *i = input;
  
  while(*i){
      cout &lt;&lt; *i &lt;&lt; endl;
      *i++;
  }   
  </code></pre>
  
  <p>This doesn't make sense to me because you are assigning a <code>char</code> <strong>array</strong> to a <code>char</code> <strong>pointer</strong> which stores an address. </p>