I have to make this program input from a file "puzzle.txt" which contains the matrix size and word puzzle contents.
For example the input would be:
5 8
hptnrocr
aeehkcra
moaiauag
itmupcni
rauioibn
Right now I am trying to get it to print the puzzle to the screen but right now the console screen just pops up and disappears quickly. I am not sure what I am doing wrong. Is my nested for loop wrong?
Since you aren't ever hitting your system call (which you shouldn't use btw, it's not very safe), I can only guess that one of your other checks is failing and causing your program to return immediately.