#include<stdio.h>
#define MAX_A 5
#define MAX_B 50
int fun(struct test (*t)[MAX_A])
{
int i, j, liczba_znakow = 0, liczba_skrocen = 0;
for (i = 0; i < MAX_A; i++)
{
for (j = 0; j < MAX_B; j++)
{
if ((*t)[i].napis[j] != '\0')
{
liczba_znakow++;
}
else
{
break;
}
}
if ((*t)[i].liczba < liczba_znakow)
{
liczba_skrocen += liczba_znakow - (*t)[i].liczba;
(*t)[i].napis[(*t)[i].liczba] = '\0';
}
}
return liczba_skrocen;
};
struct test
{
char napis[MAX_B];
int liczba;
};
int main()
{
struct test tab[MAX_A];
fun(&tab)
}
kompilator pokazuje takie błędy , CO robie tu zle ?
Error C2037 left of 'napis' specifies undefined struct/union 'test'
Error C2037 left of 'liczba' specifies undefined struct/union 'test'
Error C2037 left of 'liczba' specifies undefined struct/union 'test'
Error C2037 left of 'liczba' specifies undefined struct/union 'test'
Error C2037 left of 'napis' specifies undefined struct/union 'test'