this is my code, iv seen the other possibilities of getting this error and corrected them but i still get it.
bool move(int tile) {
int a = board[d][d];
for(int i =0; i<d;i++)
{
for( int j=0;j<d;j++)
{
if((board[i][j] == tile) && ( a == board[i+1][j] || board[i-1][j] || board[i][j+1] || board[i][j-1]))
{
return true;
}
else
{
return false;
}
}
}
}
bool won(void) {
for(int i =0; i<d;i++)
{
for( int j=0;j<d-1;j++)
{
if((board[i][j+1] > board[i][j]) && (i == d-1 && j == d-2))
{
return true;
}
else
{
return false;
}
}
}
}
this is the error i get.
clang -ggdb3 -O0 -std=c11 -Wall -Werror -o fifteen fifteen.c -lcs50 -lm
fifteen.c:225:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
}
^
fifteen.c:249:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
}
^
2 errors generated.
make: *** [fifteen] Error 1