title: Placing a negative index in C++
body: <p>In Python and C#, we need to place a negative index to get last value.</p>
  <p>In C++, I don't know how to do it. I tried the same way to do it but it didn't work out.</p>
  <p><strong>Example</strong></p>
  <pre class="lang-cpp prettyprint-override"><code>string str = &quot;get last space &quot;
  cout &lt;&lt; str[-1];
  </code></pre>
  <p>In this example, I should get <code>null</code> value because there's a tailing space in the string. How can I do this?</p>