I tried this basic one:
Code:
void func(char array[])
{
char name[255];
strncpy(name, array, 255);
printf("%s\n", name);
int twoD[5][5];
int i, j;
for(i=0; i<5; i++)
{
for(j=0; j<5; j++)
{
twoD[i][j] = i;
}
}
func2(twoD);
}
void func2(int array[][5])
{
int i, j;
for(i=0; i<5; i++)
{
for(j=0; j<5; j++)
{
printf("%d\n", array[i][j]);
}
}
}
But i get the error:
Code:
func.h:28: warning: conflicting types for ‘func2’
func.h:25: warning: previous implicit declaration of ‘func2’ was here
Actually works now, but how could I do it by passing via pointers?