#include <iostream>
#include <algorithm>
using namespace std;
int main( ){
const int N = 10;
int static_arr[N];
for( int i = 0 ; i < N ; ++i )
cout << static_arr[i] << " ";
cout << endl;
fill( static_arr, static_arr + N, 0);
for( int i = 0 ; i < N ; ++i )
cout << static_arr[i] << " ";
cout << endl;
return 0;
}
|
關於動態陣列初始化
沒有留言:
張貼留言