C
Cristian
I work on Linux system Fedora Core 5 x86_64
Why this program doesn't work?
It perfectly works if I reduce the dimension of dim1 to 1000 !!!!!!
#include <vector>
#include <iostream>
#include <cmath>
#include <string>
#include <time.h>
using namespace std;
long i, j ;
long dim1=10000, dim2=1000 ;
double m[dim1][dim2];
for ( i=0,n=0 ; i < dim1 ; i++ ) {
for ( j=0 ; j < dim2 ; j++) {
m[j] = (double) ( (j+1) + 3.0 *1/(j+1)*(j+1)*(j+1)*(j+1) + 50*
(i+1) );
}
}
cout << "v(" << 100 << "," << 99 << ")=" << m[99][98] << endl;
Thanks in advance
Why this program doesn't work?
It perfectly works if I reduce the dimension of dim1 to 1000 !!!!!!
#include <vector>
#include <iostream>
#include <cmath>
#include <string>
#include <time.h>
using namespace std;
long i, j ;
long dim1=10000, dim2=1000 ;
double m[dim1][dim2];
for ( i=0,n=0 ; i < dim1 ; i++ ) {
for ( j=0 ; j < dim2 ; j++) {
m[j] = (double) ( (j+1) + 3.0 *1/(j+1)*(j+1)*(j+1)*(j+1) + 50*
(i+1) );
}
}
cout << "v(" << 100 << "," << 99 << ")=" << m[99][98] << endl;
Thanks in advance