namespace Jill
{
double bucket(double n) { return 0; };
double fetch;
int pal;
struct Hill {};
}
char fetch;
int main()
{
using Jill::fetch;
double fetch //error!重定义;
std::cin >> fetch;//名称空间中的fetch,等价Jill::fetch
std::cin >> ::fetch;//全局char fetch
}
namespace Jill
{
double bucket(double n) { return 0; };
double fetch;
int pal;
struct Hill {};
}
char fetch;
int main()
{
using namespace Jill;
double fetch;
std::cin >> fetch;//局部double fecth
std::cin >> ::fetch;//全局char fetch
std::cin >> Jill::fetch;//名称空间Jill::fetch
//std::cout << Jill::fetch;
}