title: How to save string index
body: <p>I have a string whose each character is am storing in a char like </p>
  
  <pre><code>char currentLetter;
  </code></pre>
  
  <p>When the loop runs for <code>i=0</code> the first letter of the sting is copied to currentLetter. and on <code>i=1</code> the second letter is copied. 
  However what I want i to save each of the string index of a particular letter. </p>
  
  <p>How can I do that?</p>