// unnamespace-main-3-4.cpp By: Aiman Hanna - ©1993-2006 Aiman Hanna // This program illustrates unnamed namespaces. // // In short, the program fixes the namespace pollution problem introduced in // unnamesapce-mian-1-2.cpp (and its related files). An unnamed name space starts // with the word namespace followed directly by the {}; that is no namespace is given. // An unnamed name space is only visible within its own text file and does not span // to other files in the program. // // Key points: 1) unnamed namespace #include "unnamespace3.h" #include "unnamespace4.h" int main() { fun1(); fun2(); fun3(); fun4(); fun5(); fun6(); fun7(); fun8(); cout << endl; return 0; } /* The result of running the program Hello .. never Hi from fun1....I can give a greeting. Hello .. never Hi from fun2....I can give a greeting. Hello .. never Hi from fun3....I can give a greeting. Hello .. never Hi from fun4....I can give a greeting. Hi .. never Hello from fun5....I can give a greeting. Hi .. never Hello from fun6....I can give a greeting. Hi .. never Hello from fun7....I can give a greeting. Hi .. never Hello from fun8....I can give a greeting. */