C++ Basic Solution

-What is the :: called in C++ when used like this std::endl;? In my main file, what line of code prevents me from having to put std before every endl? Why am I supposed to do std::endl in my classes and not use the bit of code I can use in main? - a practical example where you would need to use recursion in a real world programming task.