std & the performance?

I've taken a c++ course and the teacher hates using of using namespace std;
My question is Dose is have an effect on the performance? I mean using namespace may slow the code??
Probably not, but the biggest hitter from using namespace std; is the gigantic increase in the possibility of name conflicts (which is kind of ironic because namespaces should help reduce name conflicts IMO). Just think of how many classes and functions you have to prefix with "std::" if you didn't use using namespace std.
Last edited on
This does not affect the speed of the code / resulting binary. It can affect the speed of the compilation.
Try to avoid:

 
using namespace;


or any other namespace in your header files.
closed account (zb0S216C)
CroCo wrote:
"My question is Dose is have an effect on the performance?" (Sic)

http://www.cplusplus.com/forum/beginner/89031/#msg478166

Wazzak
Topic archived. No new replies allowed.