动态创建一维数组
int *arr; //it can be any other type (char, float...)
arr = new int[n]; //n should be integer variable
动态创建二维数组
int **arr;
int N,M;
cin >> N >> M;
arr = new int*[N];
for(int i=0;i<N;i++) { arr[i] = new int[M]; }
原作:
http://www.cpp-home.com/FileIO_tutorial.php
本文地址:http://com.8s8s.com/it/it1503.htm