file.eof() doesn't do what you think it does.
It is a state, not a prediction.
If you had a 10 character file and read exactly 10 characters, eof() would still be false.
You would need to try (and fail) to read the 11th character for eof() to become true.
You need to test file input operations for success.
Code:
const int maxrow = 10, maxcol = 6;
// read lines from the file until
// - the max number of expected rows is reached
// - there are no more lines to read.
for ( xrow = 0 ; xrow < 10 && getline(xfile,line) ; xrow++ ) {
// input from a string instead of a file.
// https://en.cppreference.com/w/cpp/header/sstream
istringstream is(line);
for ( xcol = 0 ; xcol < maxcol && getline(is,xstring,',') ; xcol++ ) {
xquestions[xrow][xcol] = xstring;
}
}