C++ [Error] declaration of 'char ' shadows a parameter. what does it mean? : <p>I am trying to giving some <code>char</code> to a variable within a function by using <code>strcpy</code>. And I am getting the following errors </p>

<pre><code>[Error] declaration of 'char str3 [100]' shadows a parameter
[Error] invalid initialization of non-const reference of type 'std::string&amp; {aka std::basic_string&lt;char&gt;&amp;}' from an rvalue of type 'char*'
[Note] in passing argument 2 of 'void read_string(std::string&amp;, std::string&amp;)'
</code></pre>

<p>Here is my code as follows :</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string.h&gt;
using namespace std;

void read_string(std::string &amp;to, std :: string &amp;str3)
{
    to = "test";
    std::cout &lt;&lt; &amp;to &lt;&lt; std::endl;
    char str3[100];

    strcpy (str3,"copy successful");
    std::cout &lt;&lt; str3&lt;&lt;std :: endl;


}

  int main()
  {
    std::string s = "This should be changed.";
    char ss[100];
    read_string(s,ss);
    std::cout &lt;&lt; &amp;s &lt;&lt; std::endl;
    std::cout&lt;&lt;ss&lt;&lt;std::endl;
    return 0;
  }
</code></pre>
