Using std Namespace

前端 未结 16 968
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 04:57

There seem to be different views on using \'using\' with respect to the std namespace.

Some say use \' using namespace std\', other say don\'t but rathe

16条回答
  •  我在风中等你
    2020-11-22 05:14

    What are the pros and cons of each

    The only reason to leave off the std:: is that you could, in theory, reimplement all the STL functions yourself. Then your functions could be switched from using std::vector to my::vector without changing the code.

提交回复
热议问题