Namespace problem

I am quite new to programming, but I will try to explain what problems I think you might encounter if you are using namespaces.

If you are using prefix namespaces like “using namespace std” to not have to write std in front of all your “cout” commands what do you do if “cout” is also used by another namespace like f.eks “using namespace giberish”. There will be a conflict and your program will not be able to know which namespace it should be getting “cout” from. I am going to guess that you can fix the problem by explicitly stating “std::cout” or “giberish::cout” to solve the problem.
Please correct me if I misunderstood

Privacy & Terms