0

How can I distinguish between "using-declaration" and "using directive" in C++? What are the main differences between "using-declaration" and "using directive"? Could somebody make it clear by giving some simple examples? I would be grateful to have some help with this question.

Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67
John
  • 2,963
  • 11
  • 33

1 Answers1

2

As description in https://en.cppreference.com/w/cpp/keyword/using

using-directives for namespaces and using-declarations for namespace members

using namespace std; // using-directive   
using std::string;   // using-declaration
where23
  • 483
  • 3
  • 9