using [C++ Reference]
Keywords: keywords,using
Date: 2008-10-14T15:42:05-0700

[[using]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## using

The using keyword is used to import a namespace (or parts of a namespace) into the current scope. Example code: For example, the following code imports the entire std namespace into the current scope so that items within that namespace can be used without a preceeding “std::”.

       using namespace std;

Alternatively, the next code snippet just imports a single element of the std namespace into the current namespace:

       using std::cout;

Related Topics: namespace

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •