Sat Nov 08, 2008 3:25 pm
using namespace std;
float a[16][16];
//in this part i wish define the bidimensional dynamic array
//i'm defining unidimensional dynamic array x
const N=1000;
float* x = new float[N];
//first function using dynamic array x[]
float suma3(float x[])
{
int j; float s=0.0;
for (j=1;j<16;j++)
s=s+x[j];
return(s);
}
//second function i wish , for example here, usin a[][] as bidimensional
dynamic array. how to do?
float suma1(int i, float x[], float a[][16])
{
int l;
float s=0;
for (l=1;l<i;l++)
{
s=s+a[i][l]*x[l];
}
return(s);
}///fin suma 1
Sat Nov 08, 2008 3:27 pm
float* vals;
int main()
{
vals=new float[i][j];
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.