Namespaces

Sometimes libraries have functions, classes, or variables with the same names. Namespaces allow you to use them without mixing up which one you're talking about.

Here's how to write a namespace:

Here's an example where a namespace would actually make a difference. Let's say you wrote your own Beep function, but also wanted to use the built-in Beep function from the Windows.h library. You could use a namespace to keep them from getting mixed up, like this: