using namespace std

Dear fellow programmers

hello ! i am new to C++ programming and i am here with a question that may seem chidlish to you ..but i know that some people use " using namespace std " in the beginning of their program, i will be grateful to you if you can tell me what it is used for

sincerely
manan
using namespace simply pollutes the global namespace and can introduce conflicting identifiers.

Just for an example, let's say that you have a function called Add () and also there was a function named Add in a namespace that you decided to introduce. Well now you have an issue. You have two functions with the same identifier and (assuming the signatures are the same) they're going to conflict with each other.

Hope I helped!
My thanks to JLBorges ..that link actually helped..its a great thing you've done
Topic archived. No new replies allowed.