title: How to refer to a global variable which has the same name as a local variable in C++?
body: <p>If there is a global variable and the function has a parameter with the same name, and desired result is the sum of the local and global variable, how can we refer the global function in this particular situation? I know its not good idea to do so. But asking just for curiosity.</p>
  
  <pre><code>int foo = 100;
  
  int bar(int foo)
  {
      int sum=foo+foo; // sum adds local variable and a global variable
      return sum;
  }
  
  int main()
  {
      int result = bar(12);
      return 0;
  }
  </code></pre>