Q:

Each using declaration introduces a single namespace member. This behavior lets us be specific about which names we’re using. As an example, we’ll rewrite the program from § 1.2 (p. 6) with using declarations for the library names it uses

0

Each using declaration introduces a single namespace member. This behavior lets us be specific about which names we’re using. As an example, we’ll rewrite the program from § 1.2 (p. 6) with using declarations for the library names it uses.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <iostream>
// using declarations for names from the standard library
using std::cin;
using std::cout; using std::endl;
int main()
{
cout << "Enter two numbers:" << endl;
int v1, v2;
cin >> v1 >> v2;
cout << "The sum of " << v1 << " and " << v2
<< " is " << v1 + v2 << endl;
return 0;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now