0
double M2_0(c,m)
double c[160];
double m[16][5];
 {
 int n;
 int s=0;
 for (n=0; n<16; ++n) 
 {
 s = s + c[n+16*0]*m[n][0];
 }
return s;
}

can someone help me!
error:
c and m was not declare in this scope (this is the error in c++ but in c it's OK!)

i want to fill an array with this function.
for example:

double M[5][100] = {
{M2_0(c,m), M2_1(c,m),M2_2(c,m)...
};

c,m are double array and i need 500 function like M2_0(c,m) for filling the array.
thanks!

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by tonik69
0

Change this:

double M2_0(c,m)
double c[160];
double m[16][5];
 {

To this:

double M2_0(double c[160], double m[16][5])
 {

C++ doesn't support the old C-style function declaration. C also no longer supports it, so I don't recommend using it in C either.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.