mercredi 5 mai 2021

What does using namespace::std mean?

I'm used to

using namespace std;

which will make symbols from std available so I can type string mystring instead of std::string mystring.

But while reading some code today I found using namespace::std; (with double colon) in a header file. How does it differ from `using namespace std;

I'm aware using namespace std; should not be used on header files, but what about using namespace::std;?

Aucun commentaire:

Enregistrer un commentaire