As the other answer already stated, using std:: is necessary unless you import either the whole std namespace or std::string (see below).
In my opinion it’s nicer to use std::string instead of string as it explicitly shows that it’s a std::string and not some other string implementation.
If you prefer to write just string though, I’d suggest you to use using std::string; instead of using namespace std; to only import the things into the global namespace that you actually require.