怎样在类里面定义一个不定长度的数组?
#include <iostream>
using namespace std;
class WWW
{public:
WWW(int a,int b):x(a),y(b){}
private:
const int x,y; // x y是静态的,可变的,怎样才能实现呢?
int m[x][y];
};
#include <iostream>
using namespace std;
class WWW
{public:
WWW(int a,int b):x(a),y(b){}
private:
const int x,y; // x y是静态的,可变的,怎样才能实现呢?
int m[x][y];
};
2007-05-14 09:15
2007-05-14 12:05
谢谢个位拉,我是个新手啊,55555555,我们书都快学完了,都没学过动态的,所以不知道还能用这种方法,我会去学的了!~
2007-05-14 16:54
2007-05-14 17:07
2007-05-14 17:36
2007-05-15 19:42
2007-05-15 20:59
2007-05-15 21:38
2007-05-15 23:36