#include<iostream>
#include<string>
using namespace std;
int main() {
pair<char, string>a, b;
cin >> a.first >> a.second;
/*
或者可以这样
char t;
string s;
cvin>>t>>s;
a={t,s};
*/
cout << a.first << " : " << a.second << endl;
system("pause");
return 0;
}
C++之pair的简单用法
最新推荐文章于 2024-03-12 23:36:04 发布