初始化:
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");
2024-02-29 14:52:04
初始化:
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");