title: In 'for (auto c : str)' what exactly is c?
body: <p>If I declare:</p>
  
  <pre><code>string s = "ARZ";
  </code></pre>
  
  <p>And then run the following code:</p>
  
  <pre><code>for (auto&amp; c : s) {
    cout &lt;&lt; (void*)&amp;c &lt;&lt; endl;
  }
  </code></pre>
  
  <p>the results will correspond to the addresses of <code>s[0]</code>, <code>s[1]</code> and <code>s[2]</code> respectively.</p>
  
  <p>If I remove the <code>&amp;</code> and run:</p>
  
  <pre><code>for (auto c : s) {
    cout &lt;&lt; (void*)&amp;c &lt;&lt; endl;
  }
  </code></pre>
  
  <p>the address of <code>c</code> is always the same.  </p>
  
  <p>Presumably <code>c</code> is just a pointer into the vector and it's value advances by <code>sizeof(char)</code> with each loop but I'm finding it hard to get my head round why I'm not required to write <code>*c</code> to access the string char values. </p>
  
  <p>And finally if I run:</p>
  
  <pre><code>for (auto c: s) {
    c='?';
    cout &lt;&lt; c &lt;&lt; endl;
  }
  </code></pre>
  
  <p>It prints out 3 question marks.</p>
  
  <p>I'm finding it hard to fathom what <code>c</code> actually is?</p>