title: variables declaration with same name C++
body: <p>Is this allowed?</p>
  
  <pre><code>Class A{
  ...
  ...
  };
  
  A a; //Global object
  
  int main()
  {
     A a; // Local object
     .
     .
     .
     .
     return 0;
  }
  </code></pre>
  
  <p>Here a global object has been declared after the class definition, but also a local variable has been declared. Is it ok? Why?</p>