title: What happens when a class and a function have the same name?
body: <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  struct test
  {
      test(){cout&lt;&lt;"class"&lt;&lt;endl;}
  };
  void test(){cout&lt;&lt;"function"&lt;&lt;endl;}
  
  int main()
  {
      test();
      return 0;
  }
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>function  
  </code></pre>
  
  <p>(VS2013 ang gcc 4.8.1)</p>
  
  <p>Why function is selected? Isn't it ambiguity?</p>