title: replace a character in a string using index c++/cli
body: <p>I just start to learn c++/cli, please help.
  How do i convert string '----' to string like 'A-C-' if only the 0 and second character in the string meet the condition.</p>
  
  <pre><code>char str[] = "-----";
  if // 0 true
  {str[0] = "A";}
  if // 1 true
  {str[1] = "B";}
  if // 2 true
  {str[2] = "C";}
  if // 3 true
  {str[3] = "D";}
  </code></pre>