Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 6
    +1 it's amazing how many tutorials and college courses just tell you to use the using keyword without a thorough explanation of why namespaces are used to begin with. Commented Mar 24, 2012 at 13:19
  • People want to get on with using iostreams, strings, and so on. They don't want to have to type std:: every single time they want to use a thing, or have to remember yet another piece of boilerplate to put before their code, which will cause less-than-helpful errors if they forget it. :( Commented Mar 24, 2012 at 20:34
  • Would something like typedef std::string sstring; be an alternative? Commented Jun 17, 2012 at 9:16
  • 1
    @Colen: These poor souls can use using std::cout and friends, but it's not like cout is already a horribly long name. Commented Aug 3, 2012 at 11:43
  • 1
    If you're a college student in your first day of "my first C++ class", it's yet another thing that can cause syntax errors that you don't understand. It's easy for us to figure out because we're experienced programmers, but when you're trying to learn the language, it's yet another thing to have to worry about that you don't need. Commented Aug 3, 2012 at 18:00