Can't say for sure based on the snippet you posted, but based on what you have posted the most likely scenario is the information you are reading from doesn't have a -1 value to be read into judgeNumber[][]
Segmentation faults frequently occur when you try to overread an array, that is, when you try to access an invalid index of an array.
const int& i could be used when you want a variable of type referece (the & character) to type int with name i and you don't want the value of i to change, that is you want i to be constant, so you use the const keyword.
Reputation Points: 718
Solved Threads: 373
Nearly a Posting Maven
Offline 2,253 posts
since Jul 2005