Hi Im writing a tic tac toe board game for my programing book challenge but I cant get the bool to alternate between 1 and 0 for the player numbers. I keep getting "warning: no ‘operator++(int)’ declared for postfix ‘++’, trying prefix operator instead [-fpermissive]
player++;" but I try -fpermissive on g++ and it still gives the same message. How can I get the player to alternate between 1 and 0 every time the for loop that goes up to 9 is executed.
Please help I am a noob and I don't know how to move forward with this.
I had an enum Move in mine. The first player to go would be 'X', whether it was the human or the AI. This snippet also shows board initialization with a default symbol of choice (I wanted something fancy so that's probably why I went with string instead of char), the prompting of player move with some error checking based on the default symbol, and an example of player toggling.
You could do something similar with player toggling, but yeah, your enum is strangely named.