There is probably a very simple fix for this, but I keep running into the same compile error when I try to compile this program.
I'm just starting out building a chess program in DevC++ and so, so far, it's very simple code... I just am trying to get the board to initialize.
CODE
int main()
{
InicializarTablero(char* initablero);
system("PAUSE");
return EXIT_SUCCESS;
}
The code for the function is:
CODE
void InicializarTablero(char* initablero)
{
int fila, columna;
cout << "=====================================" << endl;
for (fila = 0; fila < 7; fila++)
{
cout << 8 - fila << " ";
for (columna = 0; columna < 8; columna++)
{
cout << " | " << initablero[fila][columna];
}
cout << " |" << endl;
cout << " ----------------------------------" << endl;
}
for (fila = 7; fila < 8; fila++)
{
cout << 8 - fila << " ";
for (columna = 0; columna < 8; columna++)
{
cout << " | " << initablero[fila][columna];
}
cout << " |" << endl;
}
cout << "=====================================" << endl;
cout << " a b c d e f g h " << endl;
}
Every time I compile it I get an error saying "Expected primary expression before "char", in reference to the first line of code in the main() function.
Any ideas?