C++ const member functions
<p>I have a syntax error that is puzzling</p>

<p>Previous code:</p>

<pre><code>class A {
public:
    void process(const string&amp; str) {};
};
</code></pre>

<p>I have </p>

<pre><code>A a;
a.process("abcd");
</code></pre>

<p>all is well 
now I change the process member function to a const</p>

<pre><code>void process(const string&amp; str) const {};
</code></pre>

<p>and now 
<code>a.process("abcd");</code> get a compile error about str being a const char[5]...</p>

<p>How the const addition impact the syntax error. I thought const only (in this context) meant that the member variables will not change?</p>

<p>Thoughts on this?</p>
