c++ pair
typedef pairpを定義します.
定義されたpはstructに相当する
栗を挙げます.
入力:
1 a.first
2 b.first
出力:
a: 1 a.firstb: 2 b.first
定義されたpはstructに相当する
栗を挙げます.
#include
#include
using namespace std;
typedef pairp;
struct ac{
int first;
string second;
};
int main()
{
p a;
ac b;
cin>>a.first>>a.second;
cin>>b.first>>b.second;
cout<
入力:
1 a.first
2 b.first
出力:
a: 1 a.firstb: 2 b.first