Use explicit std:: qualification : global namespace « Language Basics « C++ Tutorial






#include <iostream>

int main()
{
  int val;

  std::cout << "Enter a number: ";

  std::cin >> val;

  std::cout << "This is your number: ";
  std::cout << std::hex << val;

  return 0;
}
Enter a number: 1
This is your number: 1








1.10.global namespace
1.10.1.Use explicit std:: qualification
1.10.2.Bring only a few names into the global namespace