Answer
A using-declaration (using std::vector;) brings a single name into scope. A using-directive (using namespace std;) brings all names from a namespace into scope. Using-declarations are more precise and safer; using-directives are broad and collision-prone. Prefer using-declarations, scoped as narrowly as possible.
using std::string; // declaration: just string
using namespace std; // directive: everything in stdReal-world example A function uses a targeted using-declaration for std::swap to enable ADL while keeping scope clean.