Passing 2d array to header

I'm having some trouble passing a 2d array from my .cpp file to a header file

My function in my .cpp file looks like
void Lab::logoff(int (&arr)[arrC][arrR])


and my pass to my class looks like this:

1
2
3
4
5
class Lab{
public
     int logoff(int (&arr)[3][5]) const;

}


And I'm getting the error:
1
2
3
4
5
6
7
/home/ubuntu/workspace/Lab.cpp:148:6: error: prototype for β€˜void Lab::logoff(int (&)[3][5])’ does not match any in class β€˜Lab’                                                                                                                     
 void Lab::logoff(int (&arr)[arrC][arrR])                                                                                                                                        

                                                                                                                                                                        
In file included from /home/ubuntu/workspace/Lab.cpp:5:0:                                                                                                                                                                                          
/home/ubuntu/workspace/Lab.h:60:7: error: candidate is: int Lab::logoff(int (&)[3][5]) const                                                                                                                                                       
   int logoff(int (&)[3][5]) const;   







Can someone please help me?
Last edited on
1
2
3
void Lab::logoff(int (&arr)[arrC][arrR])

int logoff(int (&)[3][5]) const; 
Last edited on
Topic archived. No new replies allowed.