title: const char * as a function parameter in C++
body: <p>NOTE: I know there are many questions that talked about that but I'm still a beginner and I couldn't understand the examples.</p>
  
  <p>I got a function prototype that goes like this:</p>
  
  <pre><code>int someFunction(const char * sm);
  </code></pre>
  
  <p>Here, as you know, const char* means that this function can accept const or non-const pointer-to-char. I tried something like that in the function body:</p>
  
  <pre><code>someMemberVar = sm;
  </code></pre>
  
  <p>someMemberVar is just a pointer-to-char. The compiler gives me an error telling me:
  cannot convert from const char* to char*. </p>
  
  <p>Here, I didn't pass a constant, so either sm or someMemberVar aren't constants. So, what constant the compiler is talking about?</p>