Ad
  • Custom User Avatar

    By using namespace std, you don't have to keep defining the "std::" prefix, so you can use "string" instead of "std::string" for the return value of the function.

    It's generally not a good habit to use the entire std namespace, but in this specific case, it would have been better to replace "using namespace std;" with "using std::string;".