#004.

C++ Newsletter/Tutorial Issue 18

eZine's profile picture
Published in 
 · 2 years ago
... functions are found within namespaces. The three basic ways of making the contents of a namespace visible were discussed in C++ Newsletters #002 and #004. These are: explicit qualification, using directives, and using declarations. Consider the following namespace, which declares a class and some (non-member) functions: namespace N { class A { ... }; A& operator+(const A&, const A&); void f(A); void g(); } Now consider the following function that takes arguments of the class type: void z(N::A x, N::A y) { x + y; // (1) f(x); // (2) g(); // (3) } Given the original rules for namespaces (just the three basic meth ...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT