Accessing Elements Of A namespace

From RAD Studio
Jump to: navigation, search

Go Up to C++ namespaces Index

There are three ways to access the elements of a namespace: by explicit access qualification, the using-declaration, or the using-directive. Remember that no matter which namespace you add to your local scope, identifiers in global scope (global scope is just another namespace) are still accessible by using the scope resolution operator ::.

Accessing namespaces in classes

You cannot use a using directive inside a class. However, the using declarative is allowed and can be quite useful.