What is the namespace of tolower in transform function


  • 0
    Y

    When I wrote the code, I was struggling with the namespace specifier.
    So the code to transform from uppercase to lowercase is
    transform( s.begin(), s.end(), s.begin(), ::tolower)

    As for the last argument, where is the tolower function?
    Why would it not pass if I put std::tolower?
    what does "::" mean right here?

    Thanks for your help.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.