返回两种类型

  • 元组tuple;#include<tuple>

std::tuple<std::string,istd::string,nt>sources;

std::get<0>sources,std::get<1>sources;

  • pair

std::pair<std::string,std::string>sources;

sources.first;sources.second;

posted @ 2023-09-20 15:43  iu本u  阅读(14)  评论(0)    收藏  举报