![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#41 |
|
Programmer
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4
![]() |
Hi,
that can have various reasons. InfoGeek allready mentioned one. Firstly it depends on the project you are working on. If you're developing a library it's most likely that u use the std:: selector. Secondly it depends on how much different namespaces exist in your project. I can just speak for myself, but i want to know which method is called if two methods live in different namespaces but have similar naming. That is i want to know if i used for example the std::copy or my own lets say dts::copy in a certain situation. And i don't want to jump out of a diffecult part of code at the bottom to the top to check what namespace i had imported. Another reason is that u most often do not use that much std::-code so it's more convinient to use "using std::cin;" or precede each element with the namespaceprefix and scope-op. Sometimes you even have to use the std::whatever syntax in order to remove name-clashes. Namespace pollution is as bad as environment pollution So far ...
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup Last edited by prolog; Aug 8th, 2005 at 5:11 AM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|