std 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 " directive. IE:
using namespace std;
int foo(int value)
{
cout << "value==" << dec << value << endl;
}
Without the "using" directive, you'd have to do this:
int foo(int value)
{
std::cout << "value==" << std::dec << value << std::endl;
}
That said, a lot of standard C++ header files will do the "using namespace std;" for you, which is why you often don't see the "std::" part of these elements.
rubberman
Posting Virtuoso
1,564 posts since Mar 2010
Reputation Points: 277
Solved Threads: 179