I have already made the code and it works most of the times. One problem that I have is when I input a board full of mines, it throws an error like this:
input:
Thank you for replying. I know I can change the char array to be const char, but how do I fix the line 45 issue? Sorry for being dumb. I'm fairly new to programming.
@AbstractionAnon Thank you, I made the changes allocating the arrays as worst case and it works fine now. I also had a silly error in the lines 62 & 63 where it was supposed to be Y instead of X, that was creating mistakes in the final results. It works perfectly now.