你这两个bug 1.cout << map[ch];这里应该改成cout << map[tolower(ch)]; 2.cin>>str;应该改成getline(cin,str);为了包含空格的情况
点赞

相关推荐

牛客网
牛客企业服务