title: Address of each character of std::string
body: <p>I tried to print the address of each character of <code>std::string</code>. But I amn't understanding what is happening internally with <code>std::string</code> that is resulting this output while for the array it is giving the address as I expected. Could someone please explain what is going on?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main(){
  
     string str = "Hello";
     int a[] = {1,2,3,4,5};
  
     for( int i=0; i&lt;str.length(); ++i )
        cout &lt;&lt; &amp;str[i] &lt;&lt; endl;
  
     cout &lt;&lt; "**************" &lt;&lt; endl;
  
     for( int i=0; i&lt;5; ++i )
        cout &lt;&lt; &amp;a[i] &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Hello
  ello
  llo
  lo
  o
  **************
  0x7fff5fbff950
  0x7fff5fbff954
  0x7fff5fbff958
  0x7fff5fbff95c
  0x7fff5fbff960
  </code></pre>