Hey, I'm currently working on learning C++ and I've started a project of creating a Tic-Tac-Toe game from scratch. Currently I'm having problems with my user's input getting overrided. I have my variables limited using != , but the rand() sometimes takes the place of a already used user inputted value value.
I uploaded the current file of my project. If you compile and run it a few times you would understand what I mean if you already don't.
Simply put if I wrote X like below:
Then later in my program it gets replaced:Code:X | | ___|___|___ | | ___|___|___ | | | |
Even though, I limited the variables:Code:O | | ___|___|___ | | ___|___|___ | | | |
So if anyone can tell what I'm doing wrong or what I need to add then that would be very good. I'm almost done with the coding, and this is about the only thing holding me back.Code:opp_input4 = !(input, input2, input3, input4, opp_input, opp_input2, opp_input3);