Hello I’m 17 and trying to learn how to code. I am having trouble debugging this section of code and would appreciate some help.
bool checkifwin(char grid[3][3], char player)
{
if (checkverticle(char grid[3][3], char player)
|| checkhorizontal(char grid[3][3], char player)
|| checkdiagonal( grid[3][3], player)
return true;
else
return false;
};
It says expected primary-expression before char.
checkverticle() is a call to a function not a declaration so you don’t need the “char”s.
Just some coding advice. In my opinion:
Is not great style. I’d suggest refactoring it to: