I can't for the love of god understand why scanf doesnt work.
here's the code:
void main ()
char prev_move, next_move, new_move;
printf("Press 'y' for a new move or anything else to exit: "); scanf(" %c",&new_move);
while(new_move == 'y')
printf("\nchoose the pawn you want to move and it's current position: ");
printf("\nchoose next move: ");
for(int i=0; i<3; i++)
prev_move is a 3 positions char array. for prints 3 chars of which the first is a whitespace, and the the other two that I have entered from the keyboard. Scanf seems to place a whitespace in prev_move. Why is this happening?