一点关于map的记录

#include <bits/stdc++.h>

using namespace std;

int main() {
    map<char,int> mp;
    mp['a']++;
    if (mp['b'] == 0) printf("OK");
    printf("%d
",(int)mp.size());
    return 0;
}

该程序输出结果为

OK2

以前都没有注意过

原文地址:https://www.cnblogs.com/kjd123456/p/14984278.html