数组和集合 / 数组

#include <iostream>
#include <vector>
#include <array>
using namespace std;


//Empty array;
vector<int> n1;

// Single-dimensional array
array<int3> n2 = { 123 };
vector<int> n3 { 123 };
string s1[] { "1""2""3" };

// Multidimensional array.
int n4[2][2] = {{12}, {45}};
int n5[2][3] = {123456};
n5[1][2] = 7;

// Jagged array
vector<vector<int>> n6 = {{ 12 }, {345 }};

cout << "n2[0] is " << n2[0] << endl;
cout << "n3[1] is " << n3[1] << endl;
cout << "s1[2] is " << s1[2] << endl;
cout << "n4[1][1] is " << n4[1][1] << endl;
cout << "n5[0][1] is " << n5[0][1] << endl;
cout << "n6[1][1] is " << n6[1][1] << endl;