title: cppcheck complains dangerous use of c_str(). the value returned by c_str() is invalid after this call
body: <pre><code>char* mstring(char str) {
      std::string mystring = "task:";
      mystring.append(str);
      return (*char)mystring.c_str();//dangerous use of c_str() the value returned by c_str() is invalid after this call
  }
  </code></pre>