Possible Duplicates:
What is namespace used for, in C++?
Why is 'using namespace std;' considered a bad practice in C++?
Before asking my question I wolud like to share the below link with everybody who is eager to know about stl or may be if he has not seen this[its a video lecture/tutorial]:
I am a beginner on C++ STL and I found it very useful/entertaining as a learner. Stephan is a great teacher!!, but sorry if anywone disagrees with me or considers it a waste of time.
how are namespaces used in real time projects.I am asking this because while writing programs I usually use namepaces globally in the .cpp files like :
using namespace std;
int main()
{
//code
}
If its wrong way of declaring namespaces, how should we do it generally.
EDIT:
If we declare the namespace globally as above does it causes naming conflict or shall i declare it locally like.
int main()
{
using namespace std;
//code
}