title: C++ deprecated conversion from string constant to 'char*'
body: <p>I have a class with a <code>private char str[256];</code></p>
  
  <p>and for it I have an explicit constructor:</p>
  
  <pre><code>explicit myClass(const char *func)
  {
      strcpy(str,func);
  }
  </code></pre>
  
  <p>I call it as:</p>
  
  <pre><code>myClass obj("example");
  </code></pre>
  
  <p>When I compile this I get the following warning:  </p>
  
  <blockquote>
    <p>deprecated conversion from string constant to 'char*'</p>
  </blockquote>
  
  <p>Why is this happening?</p>