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
  • 24,410
  • 6
  • 32
  • 55
John
  • 1,927
  • 6
  • 18

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
  • 463
  • 3
  • 9