1.代码demo

2.运行结果

3.代码展示
#include<iostream>
#include<utility>
#include<vector>
#include<array>
using Point = std::pair<int, int>;
using Points = std::vector<Point>;
using Points_1 = std::array<Point,10>;
int main() {
Points Spoint{ {10,20},{10,30} };
Point points_1{ 10,40 };
Point points_2{ 10,50 };
Points_1 Spoint_1{points_1,points_2};
for (auto point : Spoint) {
std::cout << point.first << " " << point.second << std::endl;
}
for (auto point : Spoint_1) {
std::cout << point.first << " " << point.second << std::endl;
}
return 0;
}