1.数组,C++中不允许数组的下标值为变量,只能是常量或者常量表达式,必须先定义后使用.数组赋初值几种常见方式: int a[] = {1,2,3,4,5}: int a[4] = {2,1,3,4}: int a[4] = {1,2},其余默认为0: 或者:int a[2]:a[0] = 1,a[1] = 2; 2.二维数组: int a[2][3] = {{1,2,3},{4,5,6}}; int a[2][3] = {1,2,3,4,5,6}; int a[2][3] = {{1}{2}}…