Write your question here.
I can get this while loop to do the right thing. I won't it to stop if the statement is false and cout the statement but it won't stop. Please help. I wanted to use the switch statement for tic tac toe as a function so all I would have to do is put the function object in main.
#include <iostream>
using namespace std;
struct Tictactoe{
char Y,N, people;
//void Startup(char y, char n);
void board();
};
int main(){
Tictactoe A;
int BPlayNGames, BPlayNGames2,y,n, people;
cout<<"So you're here. Youz two reay to play the Ticah, Tacah, toeah game? \n"<<" If so please enter a Y; if not enter N\n\n";
char Y,N;
while(people ==y && people ==Y )
cout<<"Lets play. :-) \n\n\n";
if(people ==n && people ==N)
cout<<" Really..? You don't wanna play? Ahight if youz can't take the heat guess you gotta hop outta da kitchen. Well enjoy your day guys. :-)\n ";
cin>>people;
cout<< " Player 1 \n"<<" "<< "\n Enter a number and be quick about it will-yuh. \n\n\n";
cout<< " player 2 \n"<<" "<< "\n Your up, so enter a number and don't keep player 1 waitin for his turn; it's Tac, Tac, Toe geez...\n";
cin>>BPlayNGames;
cin>>BPlayNGames2;
A.board();
switch (BPlayNGames) {
case 0:
//cout<<square[0];
break;
default:
break;
}
return 0;
}
/*void Tictactoe::Startup(char y, char n){
cout<<"So you're here. Youz two reay to play the Ticah, Tacah, toeah game? \n"<<" If so please enter a Y; if not enter N\n\n";
while(y==Y && n==N)
if(people == y )
cout<<"Lets play. :-) \n\n\n";
else if(people == n)
cout<<" Really..? You don't wanna play? Ahight if youz can't take the heat guess you gotta hop outta da kitchen. Well enjoy your day guys. :-)\n ";
cin>>people;
}
*/
void Tictactoe::board(){
int square[10]={0,1,2,4,5,6,7,8,9,10};