Importing names individually from a namespace
suggest changeOnce using
is used to introduce the name cout
from the namespace std
into the scope of the main
function, the std::cout
object can be referred to as cout
alone.
#include <iostream>
int main() {
using std::cout;
cout << "Hello, world!\n";
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents