Hola que tal?, tengo el siguiente código
#include <stdio.h>
#include <stdlib.h>
#include <ncurses.h>
#include <pthread.h>
struct casillas{
WINDOW *casilla;
};
void iniVideo();
struct casillas panel();
void mostrar(struct casillas casillero[10][10], int, int, int);
void fin();
int main()
{
iniVideo();
int x = 2;
int y = 3;
struct casillas casillero[10][10];
casillero[10][10] = panel();
mostrar(casillero[10][10], 69, x, y);
fin();
return 0;
}
void iniVideo()
{
initscr();
start_color();
init_pair(1, 0, 7); //letras, fovdo. menu
init_pair(2, 7, 0); // panel números
init_pair(3, 0, 2); // casilla x
init_pair(4, 0, 6);
cbreak();
noecho();
keypad(stdscr, true);
curs_set(0);
refresh();
}
struct casillas panel()
{
struct casillas casillero[10][10];
int k, i, y, x;
y = 5;
x = 16;
//casillas
for(i = 0; i < 10; i++)
{
for(k = 0; k < 10; k++)
{
casillero[i][k].casilla = newwin(3, 6, y, x);
box(casillero[i][k].casilla, 0,0);
wbkgd(casillero[i][k].casilla, COLOR_PAIR(2));
wrefresh(casillero[i][k].casilla);
x+=6;
}
y+=3;
x = 16;
}
return casillero[10][10];
}
void mostrar(struct casillas casillero[10][10], int num, int x, int y)
{
mvwprintw(casillero[x][y].casilla, 2, 1, "%i",num);
wrefresh(casillero[x][y].casilla);
}
void fin()
{
endwin();
}
El cual en la línea del mani casillero[10][10] muestra la matriz creada, pero cuando invoco la funcion que sigue 'mostrar(casillero[10][10], 69, x, y);' me da el siguiente error: note: expected ‘struct casillas (*)[10]’ but argument is of type ‘struct casillas’
void mostrar(struct casillas casillero[10][10], int, int, int);
Alguien podría ayudarme por favor?
Gracias.