That is a subject that I might not be able to help, this is one of those things that is difrent from OS to OS. When I learn it was on linux, now I will be relearning for windows for an upcoming project and it is difrent than on linux, and for mac it will be difrent than what is for windows or linux.One advice that works for every system is, learn to multi-thread first (as it will be usefull to manage connections without the program getting stuck until it recieves something from the other end), how to multi-thread? It changes from OS to OS. You will have to google it and it won't be easy to find, specially for MAC OS.

"I have an irrefutable argument for the existence of...." NO, STOP! You are already wrong!

#include <iostream>#include <string>#include "Board.h"using namespace std;/* Displaying the board works the following way: There's a 3x3 array to hold the X/O's for the board. First, the show function prints the initial line of the tic-tac-toe board. This initial line is printed every time a horizontal set of 3 X/O's is done printing. Then, the actual X/O printing starts at the 1x1 spot of the board/array[0][0]. It prints each X/O's first line, in the first set of 3 horizontal X/O's of the board. Then it does the same for each of the two remaining sets of 3 X/O's in the board. When it's done printing any of the lines for each set of 3 X/O's, it prints the final character of each line, a '|'. It's part of the outline of the board. */int main (int argc, char * const argv[]) { string player1, player2; char endChar; board.pInstructions(); cout << "What's player 1's name?\n"; getline(cin,player1); cin.ignore(0); cout << "What's player 2's name?\n"; getline (cin,player2); char XorO; char pLine, pColumn; bool gameOver; char player = '1'; board.show(); while (gameOver == 0) { pLine = 0; pColumn = 0; if (player == '1'){ cout << player1 << " - it's your turn to play!\n"; } else { cout << player2 << " - it's your turn to play!\n"; }

/* Creating the strings for circles, crosses, empty rooms, the final board column and the lines in between of each line of three X/O spots.*/string Circle1 = "|/ \\"; // For the printing of each X/O there are two lines:string Circle2 = "|\\ /"; string Cross1 = "| \\/ ";string Cross2 = "| /\\ ";string Empty = "| ";string Column = "|"; // When the X/O are done printing we need the last column of the board to be printed;string Line = " ---- ---- ----";

void Board::show(void){ /* Function to be called for showing the current board */ for (int line = 0; line<3; line++) // One iteration of the *for* loop for each line of X/O's. { if (line == 0){ // Only displays bLine once, since it displays at the end of each X/O line. cout << Line << endl;// Line in between of each set of X/O's and at the beginning of each board. } for (int b = 0; b<2; b++){ // Each X/O has two lines for /'s and \'s. for (int column = 0; column<3; column++) { // One iteration of the *for* loop for each X/O. switch (spot[line][column]) { case 'X': if (b == 0) cout << Cross1; // First line for the X. else cout << Cross2; // Second line for the X. break; case 'O': if (b == 0) cout << Circle1; else cout << Circle2; break; default: cout << Empty; break; }

} cout << Column << endl; // Print the last column of the board. } cout << Line << endl; // Line in between of each of the 3 lines of X/O's. }

I have seen this a while back, but it was late and I decided to reply the next morning, which I forgot.But better late than never, here are 2 suggestions that I would make:1. On main.cpp where you find :

And why is that?You basically have something like this:condition "A": Action "B"else: Action "C"condition "A": Action "D"else: Action "E"So unless the action "B" or "C" changes the condition "A" (or A does a tangent operation that does something else, which isn't the case), then if "A" is true after action B is performed then action D will always follow as well. Similarly if "A" is false it will execute C first then it will always execute "E".So if you write it like this:condition "A": Action "B" Action "D"else: Action "C" Action "E"It will perform the actions just the same, except that now you don't need to repeat the operation of checking the A.

Because printing the first line will always happen before everything else, and more than that it will only happen once, so you don't need to force a check on this parameter for every "for" cycle.I don't know if this helps, but you can think in terms of states, dependencies and the minimal amount of operations that you need to perform.If one operation is independent of the one being executed before, then you can switch the order of the 2. If your operation need only to be performed once, only once and always once then you don't need to check if you want to perform that operation or not, you just do it once and don't put it in a cycle. You may need to check for a certain condition A to select either to perform certain operations or not, if you code smartly I would say that 90% of the cases you only have to check for that condition once in your entire code, if you do it more than once while your condition is not expected to change then you are probably doing something inefficient. Forget the temporal order by witch you would mentally perform the operations, do it instead in the order that will minimize the number of steps required to complete the task, and that may mean changing the order of things around (as long as they are interchangeable ofcourse). But I fear that sensitivity for this sort of things may only come from practice.Despite that, it is a good progress.

"I have an irrefutable argument for the existence of...." NO, STOP! You are already wrong!