Error with handing over an arry to a function


I I wrote a function, but I get this error:

o: In function `loop':
undefined reference to `check_touch(int, int, int*)

This is the code:

boolean check_touch(int X, int Y, int field[]);

void setup(){

void loop(){
  int mouseY = 21;
  int mouseX = 2;
  int main_button[] = {2,6,3,5};
    //Do Something

boolean ckeck_touch(int X,int Y,int* field){
    return true;
    return false;

What is wrong? I can’t find the mistake.


boolean ckeck_touch

The Arduino IDE has a really handy feature for finding this sort of thing. If you type "ctrl-f", it pops up a dialogue. In the field labelled "Find:" enter the name of the thing that is in the error message (int his case "check_touch"), then click on "Find". If you don't find it where you expect it, you've found your bug!

To be a little clearer than AWOL... You have this function prototype:

boolean check_touch(int X, int Y, [glow]int field[][/glow]);

and this function definition:

boolean ckeck_touch(int X,int Y,[glow]int* field[/glow])

You are calling the array version, that you haven't defined.

Read it again PaulS, carefully.

The prototype and declaration are functionally identical.
Some of the spelling, however…