来个map映射一下ok了,z的ascII码122,后面一个是'{',Z是90。注意string的find找不到返回string::npos而不是0判断条件时要注意 #include <string> #include <map> #include <vector> using namespace std; int main() { map<string,string> m ={ {"abc","2"}, {"def","3"}, {"ghi","4"}, {"jkl","...