zoukankan      html  css  js  c++  java
  • C++中map的一点疑惑...

    int CRuntimePara::getInt(const string& strKey,int iDefault)
    {
    map<string,string>::const_iterator iter;

    if ((iter = _mapParaValue.find(strKey)) != _mapParaValue.end())
    return atoi((*iter).second.c_str());
    else
    return iDefault;
    }

    _mapParaValue.end()

    -----------------------------------------------------------------------------------------

    class CRuntimePara
    {

    ...

    private:
    std::map<std::string,std::string> _mapParaValue;
    };

    ------------------------------------------------------------------------------------------

    _mapParaValue.end()为map里的end的返回置为Returns an iterator referring to the past-the-end element in the map container.返回指向_mapParaValue容器尾元素之后位置的迭代器               若begin == end

  • 相关阅读:
    牛人对IC验证的独特理解(转载)
    soc验证扫盲(转载)
    .vimrc
    matchit匹配
    格式化verilog/systemverilog代码插件
    gvim plugin管理
    .alias
    .cshrc
    get_result --perl
    run_regress --perl
  • 原文地址:https://www.cnblogs.com/the-tops/p/5629357.html
Copyright © 2011-2022 走看看