First up, you seem to have the .h and .cpp files swapped around. Is that a typo or is your actual program like that? .h files are meant to have function declarations and class definitions, and .cpp files are meant to have the specific code. It's the .cpp files which are compiled into ".o" files, which are then linked together into the executable. you should never, ever see a situation where an "include" has a .cpp file as the target, only a .h file.
Namespaces operate similarly to a class, actually:
namespace stuff
{
class foo
{
};
function bar()
{
};
};
They would then be refered to (outside of the namespace) similarly to static members of a class:
stuff:foo
stuff:bar()
If find that if you have a .h file full of globals and you want to de-spaghettify things then wrapping it all in a namespace can be a helpful first step in organizing what needs to go where (e.g. making it into a class with static members instead). Being sort of half-way between a bunch of globals and a class makes namespaces handy for refactoring code into a more object oriented fashion, and they can be useful to indicate which header file something came from, e.g. I often put "namespace input" around my input handling code, so everything there is part of the same space, even if they're different functions and classes.
Another nice thing is that namespaces can be discontinuous:
namespace foo
{
// define foo stuff
};
// another file
namespace foo
{
// define more foo stuff, or use foo stuff without the "foo::"
};
They also have no memory overhead, unlike a class, since they're just a name.