Using namespace risk explanation

When using a namespace always keep in mind this namespace might be included in multiple libraries within your code. In this case the code might be unstable and confusing to repair.
One way to get around that would be to use the double colons :: to get into the method and specify the function in use (ex. std::cout).
Another way would be to keep track of the namespace in each library you include in your code.
Hope I got it right and that it helps someone.
Love the course and Ben explanations, Love these challenges, love Discobot, this is almost better then playing video games :wink:

Privacy & Terms