7

I feel irritated when a c++ tutorial doesn't use namespace std at the top of the file.

Comments
  • 3
    I never use namespace std lol
  • 0
    Subscribing, it's gonna be fun...
  • 0
    @RazorSh4rk I'm not an experienced programmer just started recently .how does your code look when you don't use namespace std .if you don't mind could you show me a sample of your code when not using namespace at the top.
  • 1
    @zmzmuazzam98 std::something instead of something, like std::cout
  • 2
    In general you want to avoid `using namespace x`

    This is because it includes a lot of things that might accidentally conflict with variables or functions that you write. It's easy to not realize that something is in std and get a conflict when you try to make a variable. That's the reason that namespaces exist, actually!
Add Comment