error C2664:✀toupper✀ : cannot convert parameter 1 from ✀class std::basic_string<char,struct std:

2025-05-17 12:11:31
推荐回答(1个)
回答1:

if(islower(state[ix]))
    state[ix]=toupper(state[ix]);

改为

transfrom(state[ix].begin(), state[ix].end(), state[ix].begin(), toupper);