Sometimes in cases like this, it's helpful to check for an "off-by-one" or indexing error. Since your example matrix file has two lines different from the rest, this part looks suspicious:
The following is also not allowed in a C++ program: double Matrix[size[0]][size[1]];. Array sizes must be compile time constants in C++. A properly configured compiler should warn you about this issue.