I wrote a little connect 4 game (unfinished).
If i enter 0, he also throws a token into row 6, and vice-versa.
EDIT: The question is: Why is he doing that?
The array values get manipulated by "Eingabe", and nowhere else.
And Eingabe itself doesn't get manipulated, it always stays "original".
Iam a Beginner, both in C++ and english. Feel free to improve both :)
The whole "input -48" thing has something to do with used characted set, i guess. I didn't know how to change it, so i worked around.
Arrays in C++ are accessed starting at zero, so int table[5][6] has valid values at table[0][0] through table[4][5]. Your code assumes valid values in table[0][0] through table[5][6]. If that's what you want, then you need to declare table as int table[6][7] at line 5.
Line 72 would be better written as Fallen(getche()-'0');. On this line, the program calls getche() which returns a single ASCII character, presumably '0' through '9'. Fallen() expects its argument to be an integer, so to convert the ASCII character to the integer 0, you subtract '0'. If the user enters '0', the result is 0. If they enter '1', the result is 1, etc.