"using namespace std;"

Posted on 2006-04-02
Last Modified: 2013-11-17
Do you know if it is a standard practice to implement "using std::cout;" and
other shortened "using" statements to reduce overhead in a program? I'm
wondering what the benefit of using one of your examples would be over
"using namespace std;" . Is there a savings in memory or something that is
significant enough to cause a programmer to not use the entire namespace
Question by:mhho
    1 Comment
    LVL 11

    Accepted Solution

    when you do:

    using namespace std

    you are including all the std functions whereas by doing using std::cout you are only including a few functions

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
    Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now