title: How to store a const char* to a char*?
body: <p>I have <a href="http://cpp.sh/85hb" rel="nofollow">this code</a> that works as expected:</p>
  
  <pre><code>#define MAX_PARAM_NAME_LEN 32
  
  const char* GetName()
  {
      return "Test text";
  }
  
  int main()
  {
      char name[MAX_PARAM_NAME_LEN];
      strcpy(name, GetName());    
  
      cout &lt;&lt; "result: " &lt;&lt; name &lt;&lt; endl;
  }
  </code></pre>
  
  <p>If I'd like to store the result to a <code>char *</code> (because some functions within a Frameworks I'm using use only <code>char *</code> as input) without using the <code>strcpy</code> (for practicality and readability of code, and learning too), how could I do? Keeping in <code>const</code>, this works well:</p>
  
  <pre><code>const char* name;
  name = GetName();
  </code></pre>
  
  <p>but I still have <code>const</code>. </p>
  
  <p>Trying to just use <code>char*</code>:</p>
  
  <pre><code>char* name;
  name = GetName();
  </code></pre>
  
  <p>I get <code>invalid conversion from 'const char*' to 'char*'</code>. What's the best habit for this kind of conversion?</p>