What's wrong with the this first part of a game.
It everytime says Falsche Ausgabe
Code:#include <iostream> using namespace std; char f_1 = '1'; char f_2 = '2'; char f_3 = '3'; char f_4 = '4'; char f_5 = '5'; char f_6 = '6'; char f_7 = '7'; char f_8 = '8'; char f_9 = '9'; bool bGameover=false; char eingabe; char player_turn = '1'; int Schleife = 1; int main (void) { do { //Spielfeld cout << "==============" <<endl; cout << " | "; cout << f_1; cout << " | "; cout << f_2; cout << " | "; cout << f_3; cout << " | " << endl; cout << "==============" <<endl; cout << " | "; cout << f_4; cout << " | "; cout << f_5; cout << " | "; cout << f_6; cout << " | " << endl; cout << "==============" <<endl; cout << " | "; cout << f_7; cout << " | "; cout << f_8; cout << " | "; cout << f_9; cout << " | " << endl; cout << "==============" << endl; cout << "W?hlen sie ein Feld: "; cin >> eingabe; if (eingabe == 1 && f_1 == 1 ) { f_1= 'x'; } else if (eingabe == 2 && f_2 == '2') { f_2= 'x'; } else if (eingabe == 3 && f_3 == '3') { f_3= 'x'; } else if (eingabe == 4 && f_4 == '4' ) { f_4= 'x'; } else if (eingabe == 5 && f_5 == '5' ) { f_5= 'x'; } else if (eingabe == 6 && f_6 == '6') { f_6= 'x'; } else if (eingabe == 7 && f_7 == '7') { f_7= 'x'; } else if (eingabe == 8 && f_8 == '8') { f_8= 'x'; } else if (eingabe == 9 && f_9 == '9') { f_9= 'x'; } else { cout << "Falsche Eingabe" <<endl; } } while(!bGameover); cin.sync(); cin.get(); return 0; }



LinkBack URL
About LinkBacks


