A fourth noobie question - namespace std?

This is a discussion on A fourth noobie question - namespace std? within the C++ Programming forums, part of the General Programming Boards category; using namespace std;
The tutorials I get sent to often have this in them, but when i try to use ...

Well you are not using the right compiler

Originally posted by Noobie but why? am i not supposed to ever use namespace? why is it in all the tutorials? Some of them call for

#include "string6.h" what is that? it doesnt work either

Chill out

The compiler that you are using might have been developed when namespaces were not existing as part of C++. So your compiler does not have most of the recently added features / libraries of C++. So just change to the latest compilers and your problem would be solved.

w.r.t namespaces

When you say #include<iostream.h>
everything is loaded into the global namespace at one shot

If you had split your contents into multiple sections (lets say std1, std2, std3, std4) and didn't want everything to be stuffed in the global namespace, then you could say

using namespace std1; and that would load only what is there in std1 in the global space and will not load std2 / 3/ 4 in the global namespace.

Having said that std1/2/3/4 was just to help you understand. There are no such namespaces available.. unless you create any with those names

using std::cout;
using std::endl;
//continue with more if necessary
OR
std::cout << std::endl;

uh... :< it seems pretty difficult to explain that Im a noobie asking for help on a HelloWorld compilation-i dont know what std is and I dont know what all that code u are telling me I could use is and I can't read some tutorial to find out when the tutorials dont even work