matrix as a function argument

Hello,
I searched before posting, and I didn't find what I was looking for (honest!).
Please help me see the problem, I think it's so huge I can't see it.
I have this tiny piece of code:
1
2
char mask1[BOARDSIZE][BOARDSIZE];
		board1.getmask(this->side,  mask1[BOARDSIZE][BOARDSIZE]);


The prototype of getmask is : bool getmask ( bool arg_side, char mask[BOARDSIZE][BOARDSIZE] );

When I compile, I get this error:
1
2
3
4
sah_CPieces.cpp: In member function ‘virtual bool CPawn::move(CBoard&)’:
sah_CPieces.cpp:65: error: invalid conversion from ‘char’ to ‘char (*)[8]’
sah_CPieces.cpp:65: error:   initializing argument 2 of ‘bool CBoard::getmask(bool, char (*)[8])’
sah_Classes.o: In function `CBoard::getmask(bool, char (*) [8])': 


I don't understand why the compiler thinks I'm sending a char, and not a matrix...
This is for a chess game, I'm using getmask to provide the piece with the empty squares on the board.
I'm using g++ 4.3.2-1

I got it!
this is wrong:
board1.getmask(this->side, mask1[BOARDSIZE][BOARDSIZE]);
this is right:
board1.getmask(this->side, mask1);
Topic archived. No new replies allowed.