提要

暂时还没有弄懂具体是怎么实现的,算是照葫芦画瓢,先感性地认识。
实现中用到的操作,PTA 1095

//use iterator
    map<string, int>::iterator it;
    for (it = parkTime.begin(); it != parkTime.end(); it++) {
        if (it->second == maxTime) {
            printf("%s ", it->first.c_str());
        }
    }

感性的理解:
map<keytype, valuetype>::iterator it
得到迭代器it,而这里begin()和end(),分别是map容器(字符串映射到整型)的起始和终止值。然后it内的参数,通过指针访问,第一个、第二个参数分别就是对应容器的两个映射值,用y = f(x)来理解,就分别是y和x。
然后,关于c_srt(),简单的理解,就是按字符串格式输出。

小记

暂时的记录,后面好需要系统深入的学习……