What does the “::” mean in “::tolower”?
问题 I've seen code like this: std::string str = "wHatEver"; std::transform(str.begin(), str.end(), str.begin(), ::tolower); And I have a question: what does mean :: before tolower? and std::tolower not works, but ::tolower works OK 回答1: Means that it is explicitly using the tolower in the global namespace (which is presumably the stdc lib one). Example: void foo() { // This is your global foo } namespace bar { void foo() { // This is bar's foo } } using namespace bar; void test() { foo(); //