#include <iostream>
#include <string.h>
usingnamespace std;
string checker() // Change this to void checker() since we won't be returning.
{
for(int i=0;i<8;i++)
{
for(int j=0; j<8;j++)
{
if((j+i)%2==0)
return"{}"; // Change this to cout
elsereturn"[]"; // Change this to cout
}
cout<<endl;
}
}
int main()
{
cout<<checker<<endl; // Remove the cout. Only have checker();
return 0;
}
I not really sure what your function was suppose to do but I'm assuming that it is printing out the checkers board. Let me know if I am wrong or if you have more information that could help me give you a better answer.
If you don't understand anything also let me know and I will try and help to the best of my ability.