C++ using keyword

后端 未结 4 1257
醉话见心
醉话见心 2021-02-12 22:27

What is the difference between these two usage of using keyword:

using boost::shared_ptr;

and

using namespace boo         


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-02-12 23:34

    • using namespace boost makes all names in the boost namespace visible without qualification
    • using boost::shared_ptr just makes shared_ptr visible without qualification.

提交回复
热议问题