Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

maybe it's easier with an example:

// functions are kept in a separate namespace,
// so they don't involuntarily mix or shadow others:

namespace chai 
{
    void foo(int);
    in bar(float z);
}

// ... other code:

foo(13);         // error, foo not found ( missing namespace qualifier )
chai::foo(13);   // ok, correct namespace


using chai::foo; // importing only a single symbol
foo(13);         // ok found.
bar(13.2);       // error, only foo was imported.


using namespace chai;  // importing anything from namespace chai
foo(13);         // ok found.
bar(13.2);       // ok found.