Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
C++

Namespaces in C++

Avoid name clashes with namespaces; prefer std:: qualified names.

Namespaces in C++ — a practical guide to C++ namespaces with clear examples you can reuse in real projects.

C++ Tutorial Series (79/111). Prefer one article? Read the complete C++ tutorial.

Short description

Avoid `using namespace std;` in headers.

Namespace

namespace app {
int version = 1;
}
std::cout << app::version;

Leave a reply

Your email address will not be published. Required fields are marked *