title: Using static_cast in character array to use string functions
body: <p>I want to use <code>static_cast</code> to use string functions like <code>erase()</code> and <code>find()</code> in a character array, say <code>char str[50]</code>. For instance, please consider following segment:</p>
  
  <pre><code>char str[]="abcdefghi";
  char val[]="bc";
  static_cast&lt;string&gt;(str).erase(static_cast&lt;string&gt;(str).find(val[0]),1);
  </code></pre>
  
  <p>Please tell me if it is correct and if it is, then str is not retaining the value it should have, i.e. <code>"acdefghi"</code>.</p>