Namespaces namespace lib { string func() { ... } } cout << lib::func() << endl; using namespace lib; cout << func() << endl;