售前咨询:400-100-2938
C++数组的三种定义方式如下:
int arr[10];
int arr[] = {1, 2, 3, 4, 5};
int n; cout << "请输入数组大小:"; cin >> n; int* arr = new int[n];
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:c语言数组定义的三种方式