Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
aritzh7536yWelcome, although you are missing an std:: because I will assume you are a good person that does not use "using namespace std"
-
@Bumble-Bee it is considered bad practice because it makes everything in that scope to be global scoped which makes it easier to cause ambiguity as to which namespace the functions are actually from.
For example, if you are having multiple namespaces and u use “using namespace <name>;” for all those, the people who look at your code will be confused as to which function resides in which namespace. That’s a nightmare.
Also, similar named functions in different namespaces can caused unintended ambiguities because of being accumulated in same namespace 🙂 -
@Electrux oh ok,but if I am not using multiple namespaces and doing something simple,it does save time.
-
@Bumble-Bee true... but still, as a convention and for the sake of readability, it is not preferred... otherwise it is of course up to the programmer 🙂
Personally, I find writing std::cout to be much more fun 😂😂
Plus, writing :: is a trigger for giving completion in multiple engines so there is that too 😁😁
Related Rants
cout<<"Hello devRant world";
//omg this place is so cool!!!
rant
first rant
noob