64,646
社区成员
发帖
与我相关
我的任务
分享
#include <string>
#include <vector>
#include <cctype>//对字符处理的头文件
#include <math.h>
using namespace std;
void main()
{
const size_t array_size = 5;
int myarray[array_size] = {1,2,3,4,5};
for(int *begin = myarray,*end = myarry + array_size; begin != end; begin++)
cout<<*begin<<' ';
system("pause");
}
void main()
{
const size_t array_size = 5;
int int_arr[array_size] = {1,2,3,4,5};//把上一段的myarray换成了现在的int_arr就没错了
for(int *begin = int_arr,*end = int_arr + array_size; begin != end; begin++)
cout<<*begin<<' ';
system("pause");
}