About 74 results
Open links in new tab
  1. What is the function of "using namespace std;" in C++?

    This is called a namespace. So you tell the compiler, you want to use cout from the namespace std. With using namespace std; #include <iostream> using namespace std; int main() { cout << …

  2. What is the use of "using namespace std"? - Stack Overflow

    Sep 20, 2013 · When you make a call to using namespace <some_namespace>; all symbols in that namespace will become visible without adding the namespace prefix. A symbol may be …

  3. What does "using namespace" do exactly? - Stack Overflow

    Dec 7, 2015 · std::string test = "Test"; inside the global namespace makes perfect sense as-is. The name test is simply introduced, as with any other declaration. No need to look it up …

  4. What is "using namespace::std" in C++ - Stack Overflow

    Dec 16, 2021 · using namespace::std is the same as using namespace std; The :: symbol is the scope resolution operator. When used without a scope name before it , it refers to the global …

  5. c++ - What does using namespace::std mean? - Stack Overflow

    May 6, 2021 · So, essentially, without using namespace std; when you try to write cout << value; you have have to put std::cout << value;. By, adding this syntax to your preprocessor, you get …

  6. What is `using namespace std;`, and why do I need it to compile ...

    Turbo C++ is pre-namespaces. So all standard headers are not in namespace std. So you don't need the using namespace std. You will never need using namespace std in Turbo C++ …

  7. What's the problem with "using namespace std;"? - Stack Overflow

    Dec 16, 2014 · Why should using namespace std; be avoided? Reason 1: To avoid name collision. Because the C++ standard library is large and constantly expanding, namespaces in …

  8. c++ - Using std Namespace - Stack Overflow

    Excluding the basics (Having to add std:: infront of all stl objects/functions and less chance of conflict if you don't have 'using namespace std') It is also worth noting that you should never …

  9. How do you properly use namespaces in C++? - Stack Overflow

    May 23, 2014 · One advantage of "using namespace" at the function level as you suggest rather than at the .cpp file level or namespace {} block level within the .cpp is that it helps greatly with …

  10. What exactly is a namespace and why is it necessary

    Aug 23, 2015 · std is an abbreviation of standard. std is the standard namespace. cout, cin and a lot of other things are defined in it. (This means that one way to call them is by using std::cout …

Refresh