C++Primer课后习题记录
//定义
void testt(int * start, int * end, int n){
while(start < end){
*start = n;
start++;
}
}
//调用
int arr[10];
testt(arr, arr + 10, 100);
for(int i = 0; i < 10; i++){
cout << arr[i] << endl;
}Last updated