What is "std" and "::" .Like for example, std::cout. Now i know what is cout for but what is std and what are these "::" for?
Diamond3x
0
Newbie Poster
Recommended Answers
Jump to Poststd is a system-level namespace. If you want to set the namespace for a section of code, you can do so with the "using namespace <name>" directive. IE:
using namespace std; int foo(int value) { cout << "value==" << dec << value << endl; }
Without the …
Jump to PostNow i know what is cout for but what is std and what are these "::" for?
The :: operator is called the scope resolution operator. It's primarily there for accessing names declared in a namespace or class, and std is the C++ library's namespace. std::cout says to look for …
All 8 Replies
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Diamond3x
0
Newbie Poster
neartoyou
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
neartoyou
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
neartoyou
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.