...一个更自然的方法是使 clearBrowser 成为与 WebBrowser 在同一个 namespace(名字空间)中的 non-member function(非成员函数):
基于50个网页-相关网页
大多数操作符可以定义为成员函数或非成员函数。
Most operators may be defined as member or nonmember functions.
具有同一名字的成员函数和非成员函数不会相互重载。
Member and nonmember functions with the same name do not overload one another.
最后,让我们来看看如何使用非成员函数的影响对象耦合。
Finally, let's see how the use of non-member functions affects object coupling.
应用推荐