Relative Content

Tag Archive for namespace

Nested Classes or Namespace

Why do need namespaces when we have nested classes. What can be done through namespaces, can also achieved through nested classes.

Separate namespace just for exceptions?

I was doing a code review and came across something odd which I’ve never seen before. The developer decided to create a sub-namespace just to contain all the assembly’s exceptions.

Separate namespace just for exceptions?

I was doing a code review and came across something odd which I’ve never seen before. The developer decided to create a sub-namespace just to contain all the assembly’s exceptions.

How to use namespaces to separate interface from implementation, in c++?

As far as I can tell, you can make your interface known to others by providing your .h file. Your .cpp is the implementation. Then they can see the function names, the parameter types, the return type, maybe a description of how to use a function, and maybe what it does in the .h file.