S
Szabolcs Borsanyi
The following code compiles with a warning message:
passing arg 1 of `use_vector' from incompatible pointer type
How can one correctly pass a multidimensional array (by reference)
expressing that 'use_vector'
is not meant to modify any of the elements.
Thanks
Szabolcs
------------------------------------------------------------
enum { E=3 };
typedef double vector[4];
void use_vector(const vector x[E])
{
}
int main()
{
vector v[E]={0};
use_vector(v);
}
passing arg 1 of `use_vector' from incompatible pointer type
How can one correctly pass a multidimensional array (by reference)
expressing that 'use_vector'
is not meant to modify any of the elements.
Thanks
Szabolcs
------------------------------------------------------------
enum { E=3 };
typedef double vector[4];
void use_vector(const vector x[E])
{
}
int main()
{
vector v[E]={0};
use_vector(v);
}