title: Passing default string pointer to function
body: <p>there is a prototype of a function in my fuu.h. I want to pass default values if there </p>
  
  <pre><code>void MyFunction(
      int iError = 0,
      std::string * MyProblemString = ""
      );
  
  // Some attemts:
  
  void MyFunction(
      int iError = 0,
      std::string * MyProblemString = std::string{""};    // does not work to, complains about missing '*' 
      );
  
  void MyFunction(
      int iError = 0,
      std::string * MyProblemString = &amp;std::string{""};   // does not work to, refering address to temporary value
      );
  
  void MyFunction(
      int iError = 0,
      std::string * MyProblemString = *std::string{""};   // does not work to, overloaded operator not known
      );
  
  void MyFunction(
      int iError = 0,
      std::string * MyProblemString = "";     // could not convert ‘""’ from ‘const char [1]’ to ‘std::__cxx11::string* {aka std::__cxx11::basic_string&lt;char&gt;*}’
      );
  
  in my c-file is written:
  
  void MyFunction(
      int iError,
      std::string * MyProblemString,)
  {
      // do some stuff
  }
  </code></pre>
  
  <p>With the int it's working fine. How can I make the same thing with the string?</p>
  
  <p>There are some examples with other constructions, but passing a pointer does not work.
  <a href="https://stackoverflow.com/questions/14612933/const-reference-default-value">const reference default-value</a></p>
  
  <p>thx</p>