Namespaces are a way to collect code from multiple files under an umbrella. For example, the standard library is in namespace std::. The advantage is that you are unlikely to accidentally use both the same namespace AND same variable/class name. But without namespaces you could easily use a somewhat obscure variable name and have a definition collision.
Namespaces are NOT part of linux, they are part of C++.
|