What is std and what does it means?

What is std and what does it means? What is the full form of these 3 letters?

And what are these "::"

for eg std::cout.

"std" a namespace. The "::" operator is the "scope" operator. It tells the compiler which class/namespace to look in for an identifier.

So std::cout tells the compiler that you want the "cout" identifier, and that it is in the "std" namespace.

If you just said cout then it will only look in the global namespace. Since cout isn't defined in the global namespace, it won't be able to find it, and it will give you an error.


using namespace std; tell the compiler "take everything that's in the std namespace and dump it in the global namespace". This allows you to use cout without the std:: prefix, but it increases the probability for name conflicts, since a bunch of extra names that you didn't expect also got added to the global namespace, and that might butt heads with some of your own names.
I knew that, but why is it called "std"?
why not something else?

sorry for pirating your question like that ;)
I think std stands for standard as in the C++ standard library.
Last edited on
std stands for standard, if I'm not wrong.
Sexually transmitted disease. Stay safe kids :D
On a serious note, it just means standard, as the two people above me stated.
Topic archived. No new replies allowed.