bitPhile

Home

❯

notes

❯

tech

❯

c++

❯

using declaration

using-declaration

Mar 09, 20261 min read

  • cpp
  • programming

using-declaration is used to alias an unqualified identifier to a qualified identifier.

For example, to refer std::cout just cout, we can use

#include <iostream>
 
int main(int argc, char const *argv[])
{
    using std::cout;
 
    cout << "Hello world";
    return 0;
}

References

  1. https://www.learncpp.com/cpp-tutorial/using-declarations-and-using-directives/

Graph View

Backlinks

  • Namespaces in C++

Created with Quartz v4.5.1 © 2026

  • Made with ❤️ by Nitin