Correct programming with namespaces


New Member
I wonder what is the right way to use namespace while calling functions or using classes from libraries. Should I always call a function in the format namespace::func()?

I'm a little bit confused because when I'm trying to use the function cout from <iostream> I always need to add the library namespace - std::cout.

But when I'm trying to call a function from <ctime> library which belongs to std namespace, I don't need to add the namespace before the function name.

Why is that?