title: What does it mean that "a declaration shadows a parameter"?
body: <p>I am trying to make a function that returns double the integer number that I will pass to it.  I am getting the following error message with my code:</p>
  
  <blockquote>
    <p>declaration of 'int x' shadows a parameter int x; "</p>
  </blockquote>
  
  <p>Here is my code: </p>
  
  <pre><code>#include &lt;iostream&gt;
  int doublenumber();
  using namespace std;
  int doublenumber(int x)// &lt;-- this is the function which returns double the value .
  {
      int x;
      return 2 * x;
      cout &lt;&lt; endl;
  }
  int main()
  {
      int a;
      cout &lt;&lt; "Enter the number that you want to double it : " &lt;&lt; endl;
      cin &gt;&gt; a;
      doublenumber(a);
  
      return 0;
  }
  </code></pre>