urgent - passing values, function...weird
Hello all,
I really need to write a function with 3 caracteristics:
1) one of it's argument's is a type that I define in the header, the type is a double [50][50]
2) then the function alters a term of the first argument, the term is indexed by other arguments. So, we have:
1 2 3 4 5 6
|
typedef double myType [50][50];
void myFunction (myType X, double value, int index1, int index2)
{
X [index1][index2] = value;
}
|
But it doesn't work: the value is not altered, and the indexed value is a random non sense number.
I really need some help, I know that I'm doing something wrong...any advice??
PS: It seems that the values of X that are passed to the function are not right
Thx in advance!
Last edited on
It's nothing wrong with this function.
@guilhermecm
I really need to write a function with 3 caracteristics:
|
I counted only 2 characteristics.:)
1) one of it's argument's is a type that I define in the header, the type is a double [50][50]
|
It would be more correctly to say one of it's
parameter
But it doesn't work: the value is not altered, and the indexed value is a random non sense number. |
It depends only on you which values will have indexes.:)
So we can say nothing why does not your function work because we do not see how you call it.
Last edited on
Topic archived. No new replies allowed.