"Birt" <bi***@imp.com> wrote in message
news:r5******************@bgtnsc05-news.ops.worldnet.att.net...
An article states: the global namespace be polluted, causing "a namespace
collision."
What does this mean exactly? Thank you very much!
When you write using namespace X, the names in that namespace are made visible
in the current scope.
Say,
namespace X{
class Y{
};
}
class Y{
};
int main(){
Y y; // OK
}
Next write using namespace X, so class Y gets introduced in the current scope.
namespace X{
class Y{
};
}
using namespace X;
class Y
{
};
int main{
Y y; // Error...Y is ambiguous
}
-Sharad