hi how to do this?

Hi dear all...
i am confusing for c++ now...

void displayExit ( const string function[i][j] , int b )
{
cin >> yes ||no; // close menu
cout << "Are You Sure Want To Exit?" << endl;
if ( exit == Y)
{
cin >> yes;
cout << " Thanks For Play This Game" << endl;
}
else if (exit == N)
{
cin >> no;
cout << " Please press any key to continue" << endl;
}
else ( answer != Y || N)
{
cout << " You Had Enter The Wrong Key" << endl;
}

}

i did tis jus now.....
but it cant run...
can anyone help me?
thx
maybe you can try this
1
2
3
4
5
6
7
8
char exit;
cin >> exit;
if(exit == Y)
    //...
else if(exit == N)
    //...
else(exit != Y||N)
   //... 

you got the c++ syntax wrong, like what yang said is right, but your program structure is wrong, if you are struggling with c++ try this tut

http://newdata.box.sk/bx/c/index.htm

^^^Defentaely worth the 21 days, I learnt it and it worked. :D
Topic archived. No new replies allowed.