Im trying to write a chess program. its supposed to take 4 characters as input from the console. so for example a2a3 to move the pawn from the bottom left up one space. The only way i know how to take this sort of input is with a char array but the problem here is that the input goes out of bounds if the user enters 5 characters and the program breaks. How do i solve this problem or if im going about it the wrong way in a more general sense what should i do differently? i know i could just set the size of the array to 1000 or something but that's a stupid solution.