I have the following code of declarations:
struct coord {
int x;
int y;
}
void rotateFig(struct coord[10][10]);
I need to implement rotateFig.
I tried to start with following:
void rotateFig(struct coord[10][10] c)
{
//code
}
I can`t compile it - probaly the way I transfer c in the function definition is incorrect .How should I transfer c using given signature. Thank you
Use this definition:
void rotateFig(struct coord c[10][10])
{
//code
}
The array is the actual parameter, so the dimensions have to come after its name, not before.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With