Struct in function

Hi all,
i wrote this in my code:

struct inputBoardType{
  boolean before;          
  boolean now;
  int type;
  int typeBefore;
  int value;
};

inputBoardType board[8][8];
inputBoardType example[8][8];

void setup(){}

void loop(){
    example = copy(board);
}

inputBoardType copy(inputBoardType table[][8])
{    inputBoardType destination[8][8];
     for(k=0; k<8; k++)
     {
         for(j=0; j<8; j++)
         {
              destination[k][j] = table[k][j]
          }
     }
     return table;
}

and the message error was "Error: inputBoardType does not name a type".

Help me please! What could i do to resolve the problem?

Thanx :wink:

Arduino moves all the function declarations to above your declarations. Try:

struct inputBoardType copy(struct inputBoardType table[][8])

What is the type of inputBoardType? You have defined a type called struct inputBoardType.

Before you get too far in changing the code, though, the struct inputBoardType is a minimum of 8 bytes. 128 instances of that type are going to chew up a lot of SRAM. Do the values in the struct need to be ints?