> 本文档由 [C++那些事网站](https://light-city.github.io/stories_things/cpp-things/using/) 同步生成,网站版本含多语言与更新排版。 # C++ using 声明与别名 ## 关于作者: 个人公众号: ![](https://raw.githubusercontent.com/Light-City/CPlusPlusThings/master/img/wechat.jpg) ## 基本使用 局部与全局using,具体操作与使用见下面案例: ```c++ #include #define isNs1 1 //#define isGlobal 2 using namespace std; void func() { cout<<"::func"< using namespace std; class Base{ public: void f(){ cout<<"f()"< V1; using V2 = vector; ``` 完整代码见:[using_typedef.cpp](https://github.com/Light-City/CPlusPlusThings/tree/master/basic_content/using/using_typedef.cpp)