Nie mogę dostać się w funkcji do wskaźnika

0
#include <stdlib.h>
#include <stdio.h>
/*
0-białe 
1-czarne
*/
typedef struct
{
	char FieldColor;
	char Figure;
}Field;
void render(Field** tab)
{

}
void initBoard(Field*** tab)
{
	int x = 0,y=0;
	for (x = 0; x < 6; x++)
	{
		for(y = 0; y < 6; y++)
		{
			if ((y + x) % 2 == 0)
				*tab[x][y].FieldColor = 'b';
		}
	}
}
int main()
{
	Field** tab;
	int x;
	int* p;
	tab = (Field**)malloc(sizeof(Field*) * 6); for (x = 0; x < 6; x++)tab[x] = (Field*)malloc(sizeof(Field) * 6);
	tab[1][1].Figure = 'c';
	initBoard(&tab);
	system("COLOR 0C");
	printf("Welcome to the color changing application!\n");
} 

Dlaczego visual nie chce tego skompilować ? Dostaje: " error C2100: illegal indirection "

0
(*tab)[x][y].FieldColor = 'b';

Następnym razem podaj linijkę kodu, której błąd dotyczy.

0

Dzięki ;)

1 użytkowników online, w tym zalogowanych: 0, gości: 1