Declaring A namespace

From Appmethod Topics
Jump to: navigation, search

Go Up to C++ namespaces Index

An original namespace declaration should use an identifier that has not been previously used as a global identifier.

     namespace alpha {  /* ALPHA is the identifier of this namespace. */
       /* your program declarations */
       long double LD;
       float f(float y) { return y; }

A namespace identifier must be known in all translation units where you intend to access its elements.

See Also