#46261: 使用sort+pair


wang.how.yi@gmail.com (04王浩亦)


 
vector<pair<int, pair<int, pair<string, string>>>> arr;
 
arr.push_back(pair<int, pair<int, pair<string, string>>>(班級, pair<int, pair<string, string>>(座號, pair<string, string>(姓名,個介))));
 
sort(arr.begin(), arr.end());
 
cout << arr[i].first << " " << arr[i].second.first << " " << arr[i].second.second.first << '\n'
             << arr[i].second.second.second << '\n';