Cannot creating new double*
Hi,
This code while creating 'u' have an error.
Please Help me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#include <math.h>
#include <fstream>
#include <iostream>
using namespace std;
#define pi 3.1415
int main()
{
int N,i,size,j,n;
double mesh,T,end;
cout << "Welcome To Wave Equation Solution Program\nPlease Enter the size of the Mesh(for Example:0.01):";
cin >> mesh;
cout << "Please Enter the Time Finish Step:";
cin >> T;
N = (int)T/mesh;
size = (int)200 / mesh;
cout <<endl<<N<<"\n"<<size;
double***u;
u = new double**[N];
for (i = 0; i < N; i++)
{
u[i] = new double*[size];
for (j = 0; j < size; j++)
{
u[i][j] = new double[size];
}
}
cin>>end;
return 0;
}
|
Thanks.
Last edited on
What is the error?
Topic archived. No new replies allowed.