0
A noob question: "but what is that namespace thing?"
2 Antworten
0
think of namespaces as folders. each folder contains bits of code (like cout). so, when you are writing out code, you have to tell the compiler where to look for the code. so writing std::cout tells the compiler to look in std for the code relating to cout. using namespace std; tells the compiler hey, whenever you encounter a bit of code you don't understand, go ahead and look in this 'folder' for it. so std:cout becomes just cout. you run into problems if you have a function with the same name in two different namespaces. i am over simplifying it, but hope this helps.
0
When you're writing programs in a PC, you don't need to include namespace and stuff... Just type #include<in stream.h>