数组大小问题请教# Unix - 噫吁兮,危乎高哉
v*t
1 楼
下面是一个简单的矩阵加法的程序,但是在VC6.0下运行矩阵大小不能超过400*400
而在学校的unix上用g++ 运行不能超过1000*1000,否则就出错。但我的账号空间足够大。
请问是什么原因?为什么只能支持这么小的矩阵?谢谢。
// Matrix.h: interface for the Matrix class.
//
//////////////////////////////////////////////////////////////////////
#define matrix_size 700 //这里的size一改成1000以上就出错
//const int matrix_size = 17000;
class Matrix
{
public:
friend Matrix &operator+(Matrix&, Matrix&);
Matrix(int);
Matrix();
~Matrix();
int element_value;
int arr[matrix_size][ma
而在学校的unix上用g++ 运行不能超过1000*1000,否则就出错。但我的账号空间足够大。
请问是什么原因?为什么只能支持这么小的矩阵?谢谢。
// Matrix.h: interface for the Matrix class.
//
//////////////////////////////////////////////////////////////////////
#define matrix_size 700 //这里的size一改成1000以上就出错
//const int matrix_size = 17000;
class Matrix
{
public:
friend Matrix &operator+(Matrix&, Matrix&);
Matrix(int);
Matrix();
~Matrix();
int element_value;
int arr[matrix_size][ma