编写程序,使用指针把一个int型数组的所有元素设置为0
int main(){www.zzzyk.comconst size_t a = 5;int int_a[a] = { 0, 1, 2, 3, 4};for (int *pBegin = int_a; pBegin != int_a+a; pBegin++) //数组的遍历{*pBegin = 1;cout << *pBegin;}return 0;}
补充:软件开发 , C++ ,
int main(){www.zzzyk.comconst size_t a = 5;int int_a[a] = { 0, 1, 2, 3, 4};for (int *pBegin = int_a; pBegin != int_a+a; pBegin++) //数组的遍历{*pBegin = 1;cout << *pBegin;}return 0;}
补充:软件开发 , C++ ,