I'm trying to copy one element value in an array to other array(Line no: 19
) in the following program.
There is some problem due to which it is displaying ZERO
Could someone help me in fixing the Problem in this function member.
Thanks in advance.
int tdms (int m, float* x,float* y,float* z, float* w, float* u,float tt,float ddt )
for(int k=1; k<=2;k++)
cout<<"\nTime step: "<<ddt*k<<"\n\n";
for (int i=1; i<m; i++)
Last edited on
Zero for which element(s) of which array(s)?
Have you tried stepping through it with a debugger to see what;s going on?
Your loops look odd to me. You're starting your loop counters at 1 rather than 0, and your array indices are an inconsistent mix of
No way this will run, so what is g and what is h ?? I guess these are global, but ... however, maybe it's not copying, that doesn't work ??
I checked it (with other values, i think) and all arrays that should contain copies do so at last ... so you'll have to check your calculations, i guess.