I corrected the typedef as you said, but the compiler still complains:
cannot convert ‘void (* (*)[2])(event*)’ to ‘void (* (**)[3][2])(event*)’ in initialization |
in line:
static p_matrix p_event = new matrix {{0}};
Thanks for your answer, i really look forward to solve this.
EDIT:
I'm not sure myself really... i'll go OT for a simple question.
I'm doing this to avoid to put switches and if when i call function (so it should be faster).
I have a menu application, in which i want to manage various state (an enum takes care of it) and various
input from the player. There are a lot of switches to do if i don't use arrays of pointer, so for me it shoudl be "worth".
This is my first real "worthy" project, but i'm not that skilled as programmer.
In your opinion, is it good this way? or i should put switches? (maybe the compiler is already optimized for that kind of routine...).