C++动态数组分配
摘要:
动态一维数组:#include<iostream>using namespace std;int main(){ int len; cin>>len; int *p=new int[len]; delete[] p; p = NULL; return 0;}动态二维数组:int main(){ int row, col; cout << "Please enter the number for row and column: " << endl; cin >> row >>col; //为二维数组开辟空 阅读全文
posted @ 2011-04-01 15:06 Livid 阅读(338) 评论(0) 推荐(0) 编辑