C Plus Plus using

From GMpedia.org Wiki

Jump to: navigation, search

The using statement in C++ introduces the indicated namespace into the current declarative region.

Without 'using', you have to add the std:: namespace to the beginning of things like 'cout' & 'endl':

std::cout << "Hello!" << std::endl << name << "!" << std::endl;

With 'using':

cout << "Hello!" << endl << name << "!" << endl;

[edit] See Also

Personal tools