改写要求1:改写为以单链表表示二维数组 #include <cstdlib> #include <iostream> using namespace std; struct LinkNode { int Row; int Column; int Data; LinkNode *next; }; class MATRIX { int m; int sum; public: struct LinkNode* creat(int x[][40],int k) { m=k; LinkNod…
改写要求1:改写为以指针为数据结构 #include <iostream> #include <cstdlib> using namespace std; class ARP { int m; int* p; int count[10]; public: ARP(int x[],int size) { m = size; p = new int [m]; for (int i =0;i<m;i++) { p[i]=x[i]; } for (int i =0;i<m;i+…