-
non expected output
when my program reaches this point it just exits the program after input
Code:
cin >> selection;
cout<<"1\n";
if (selection == ('q' ||'Q'))
{
cout<<"2\n";
QuitGame();
}
if(selection == ('n' || 'N'))
{
cout<<"3\n";
NewGame();
}
if (selection == ('l' || 'L'))
{
cout<<"4\n";
Load();
}
it quits right after the 1 is printed but doesnt get any farther
-
>>if (selection == ('q' ||'Q'))
should be
>>if (selection == 'q' || selection == 'Q')
or there are other versions.
Next time, C++ code on the C++ forum please... :)
-
lol sorry about wrong board :P