Error with handing over an arry to a function

Hi,

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};
  if(check_touch((int)mouseX,(int)mouseY,main_button)){
    //Do Something
  }
}

boolean ckeck_touch(int X,int Y,int* field){
  if((X>field[0])&&(X<field[1])&&(Y>field[2])&&(Y<field[3])){
    return true;
  }
  else{
    return false;
  }
}

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

Greetings
Philipp

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…