C++: Why member function has priority over global function

前端 未结 6 736
青春惊慌失措
青春惊慌失措 2020-12-17 21:14

Why in the next program the member function foo has priority over the global foo although the global one match the type?

#include 
using name         


        
6条回答
  •  囚心锁ツ
    2020-12-17 21:42

    In terms of priority for scope resolution (default) when using same name of an identifier, local scope, member of class (class scope), global scope

提交回复
热议问题