No such thing as "shared" namespaces. A namespace is a namespace, it doesn't have "shared" attribute. A namespace is just something that better organizes the data, classes, structures and code. It's main purpose it to avoid name clashes. Without namespaces all names must be unique throughout the program (with a few exceptions). If I declared a variable named int x; in one *.cpp file and declared a variable with the same name in another *.cpp file the liker would most likely complain that it found two variables with the same name. But if I put each of those variables in different namespaces then the linker would have no problem because each would actually be different variables.