title: Substitute char array with std::string in an input parameter to a function
body: <p>Following are two legacy routines. I cannot change the routine declarations.</p>
  
  <pre><code>static bool GetString(char * str);        //str is output parameter
  static bool IsStringValid(const char * str);    //str is input parameter
  </code></pre>
  
  <p>With call as follows</p>
  
  <pre><code>char inputString[1000];
  
  GetString(inputString);
  
  IsStringValid(inputString);
  </code></pre>
  
  <p>Instead of using fixed char array, I want to use std::string as the input. I am not able get the semantics right (string::c_str).</p>