Second you should be supplying compile time constant sizes for your arrays, or better yet start using std::vector instead.
Third you should always check if your file opened properly. The way your program is currently structured if the file fails to open you'll go into an infinite loop in your file reading loop. And since you're using arrays you should also always check that the array index doesn't go out of bounds for your array size.