【STL】-pair的用法

初始化:

  std::pair<int, float> p; //initialize p.first and p.second with zero

  std::pair<int, const char*> p(42, "hello");

  make_pair(42, "hello"); // no need for the var name, it's returned by make_pair

  make_pair<int, float>(42, "hello"); 

posted on 2014-07-22 08:54  醉清风JM  阅读(169)  评论(0编辑  收藏  举报

导航