“using namespace std;”

One can often see C++ code with using namespace std; on top, but that is a bad idea. The C++ standard requires that the “std” namespace contain certain symbols, but it doesn't prevent it from containing other symbols (presumably, implementation details of the standard library). If you use using namespace std;, you never know what else you might also be bringing into the global namespace.

One possible alternative is to selectively do using std::cout;, using std::string; and so forth, for each symbol that you wish to use.