64,670
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
namespace NS
{
int i, j;
int max(int x, int y)
{
return x>=y?x:y;
}
}
int main()
{
NS::i=6, NS::j=7;
{
using namespace NS;
j++;
i++;
std::cout<<"max="<<max(i, j)<<std::endl;
}
NS::i=NS::i+NS::j;
std::cout<<"max="<<NS::max(NS::i, NS::j)<<std::endl;
return 0;
}