In class, we always use this, but every time I watch a tutorial or see references to something else online, they use std::cout. I decided to look it up and only recently learned it was bad practice, and it makes perfect sense.
The problem is not actually the namespace, but rather the library. Remember that we’re using the library called iostream, which has pre-written functions such as cout and cin. Realistically, we’ll end up including several libraries whether it’s for graphics or mathematical functions or other things. The problem is that somewhere in those libraries, there may be a function called cout or cin. If the same function exists in multiple libraries or namespaces, the compiler won’t know which one to use. However, by using std::cout_ we’re specifying the cout method in the std namespace.