I want to learn to code so I decided to start by making a simple tic tac toe game. I have a plan in my mind but I'm not sure if you can actually do it.
I've made the tic tac toe board fine. Below the tic tac toe board I want to have it so it says something like "Player 1 make your move!" and then after they have clear those couple lines of text and write something new for player 2. I know there is a system("CLS") command but I don't want to clear all the code just a couple of lines.
Is there a way to do this? If not, any suggestions on what to do.
There is a way to only clear/overwrite a few lines depending on your operating system however for this system("cls") will do.
I want to have it so it says something like "Player 1 make your move!"
For this simply #include <iostream> at the top. And then you could add the line using namespace std. After that inside of main use the cout object from the iostream to display text. cout << "some text in quotes";. If you didn't use using namespace std it would be like this std::cout << "some text in quotes";. Also if you want to take in input use std::cin >> someVariable.
and then after they have clear those couple lines of text and write something new for player 2
For this use the system("cls") command and then after that redisplay the tictactoe board, loops is what you would need here. After that it would like you only cleared the responses and text whilst displaying updated board.
If you need help I could show you my tic-tac-toe game or just ask for more help here.