std::transform() and toupper(), no matching function

前端 未结 3 1614
暗喜
暗喜 2020-11-29 20:07

I tried the code from this question C++ std::transform() and toupper() ..why does this fail?

#include 
#include 

int main()         


        
3条回答
  •  没有蜡笔的小新
    2020-11-29 20:38

    std::transform(s.begin(), s.end(), s.begin(), 
    std::bind(&std::toupper, std::placeholders::_1, std::locale()));
    

    If you use vc toolchain,please include locale

提交回复
热议问题