This is a piece of a simple Tic Tac Toe program...
The problem is that in the main menu function whenever else condition is true the program doesn't quit. (It supposed to return to main and check bool var and then returns 0)
How to fix this without changing the data type of MainMenu function? Also how can I write this in a more better way without changing the data type of MainMenu also?
I want to directly quit the program, not just to pause it.
The rest of the program if the user pressed 'Y' is working 100% fine, it's just that when 'n' is pressed the program doesnt quit
The problem is that in the main menu function whenever else condition is true the program doesn't quit. (It supposed to return to main and check bool var and then returns 0)
check your compiler or build it , tested your program at cpp.sh and it working fine
whenever the else statement is true is program is quitting