How can I “unuse” a namespace?

后端 未结 7 2275
庸人自扰
庸人自扰 2020-11-29 03:01

One of the vagaries of my development system (Codegear C++Builder) is that some of the auto-generated headers insist on having...

using namespace xyzzy
         


        
7条回答
  •  北海茫月
    2020-11-29 03:37

    You may be stuck using explicit namespaces on conflicts:

    string x; // Doesn't work due to conflicting declarations
    ::string y; // use the class from the global namespace
    std::string z; // use the string class from the std namespace
    

提交回复
热议问题