exe6.17

来源:互联网 发布:网络黑客的主要行为 编辑:程序博客网 时间:2024/06/08 22:22
bool A(const string &s){    bool isA = false;    for (auto c : s){        if (isupper(c)){            isA = true;        }    }    return isA;}void B( string &s){//!!!这里多加了一个const    for (auto &c : s){//!!!之前这里忘了加&        if (islower(c))            c = toupper(c);    }}
0 0
原创粉丝点击