#Why is `std::` sometimes not needed?

5 messages · Page 1 of 1 (latest)

blissful helm
#

Assuming you don't have using namespace std;, you need std:: for things like std::cout, but for some things like std::time(), the std:: can be omitted and it won't cause any errors. What's going on?

ebon bane
#

C standard library functions are in the global namespace

#

it's not the same code as the std:: variants tho

rigid sable
#

^^

blissful helm
#

So is it better practice to use the std:: variants?