#include <iostream>
using namespace std;
namespace ALL
{
namespace V2014
{
void fun(int num)
{
cout<<"int"<<"V2014"<<endl;
}
}
inline namespace V2015
{
void fun(int num)
{
cout<<"int"<<"V2015"<<endl;
}
void fun(double num)
{
cout<<"int"<<"V2015"<<endl;
}
}
}
int main()
{
ALL::V2014::fun(1);//明确调用一个版本
ALL::V2015::fun(1);
ALL::fun(1);//指定一个默认版本
cout<<endl;
cout << "Hello World";
return 0;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)