Why is "using namespace std;" considered bad practice? | C2C Community

Why is "using namespace std;" considered bad practice?

  • 2 September 2022
  • 2 replies
  • 13 views

1189

I have heard using namespace std; is bad practice, and that I should use std::coutskytvwhatsapp and std::cin directly instead. Why is this? Does it risk declaring variables that share the same name as something in the std namespace?


This topic has been closed for comments

2 replies

Userlevel 7
Badge +56

Hi @roywilliq32,

can you let us know what exactly are you talking about? Which Google Cloud technology?

Userlevel 7
Badge +13

Hello, @roywilliq32 and welcome to C2C!
 

First things first, please present yourself to our community in the C2C Lounge using this template. It would be great to get to know you better.

Secondly, we are the Google Cloud Customer Community and your post above is not related to Google Cloud or any of its technologies. Therefore, I have to close this topic. Please post topics related to Google Cloud and its technologies.

 

Thank you kindly for your understanding.