Andrew SaLoutos / Matrix
Revision:
6:0c77fd691ba8
Parent:
5:a4014ab0a8cf
--- a/Operators.cpp	Sun Oct 30 16:29:23 2011 +0000
+++ b/Operators.cpp	Thu Oct 01 04:06:38 2020 +0000
@@ -20,6 +20,7 @@
     if( row >= _nRows || col >= _nCols)
     {
         printf("\n\nError:\nOut of limits @ Matrix::operator()\n");
+        return _matrix[0][0];
     }else{
         return _matrix[row][col];
     }
@@ -33,6 +34,7 @@
     if( row >= _nRows || col >= _nCols)
     {
         printf("\n\nError:\nOut of limits @ Matrix::operator()\n");
+        return _matrix[0][0];
     }else{
         return _matrix[row][col];
     }
@@ -110,7 +112,10 @@
 
         return leftM;
 
-    }else{ printf( "\n\nERROR:\nDiferent Dimensions @ += operator\n" );  }
+    }else{ 
+        printf( "\n\nERROR:\nDiferent Dimensions @ += operator\n" );  
+        return leftM;
+    }
 }
 
 
@@ -128,6 +133,7 @@
 
     }else{
         printf( "\n\nERROR:\nDiferent Dimensions @ -= operator\n" );
+        return leftM;
     }
 }
 
@@ -146,6 +152,7 @@
         return resultM;
     }else{
         printf( "\n\nERROR:\nDiferent Dimensions @ *= operator\n" );
+        return leftM;
     }
 }
 
@@ -197,6 +204,7 @@
 
     }else{
         printf( "\n\nERROR\nDiferent Dimensions @ + operator \n" );
+        return leftM;
         //Matrix error(4);
         //error.Clear();
         //return error;
@@ -236,6 +244,7 @@
 
     }else{
         printf( "\n\nERROR:\nDiferent Dimensions @ + operator \n" );
+        return leftM;
 
     }
 }
@@ -276,6 +285,7 @@
     } else {
 
         printf("\n\nERROR:\nDiferent Dimension matrices @ * operator");
+        return leftM;
     }
 
 }