Note: You can contact @ashok-arora if you face any problem while solving this issue.
It is impossible to work with const Matrix objects as none of the methods are declared const.
Description
Using a const Matrix object I can't even call basic methods like row_length(), col_length(), print(), etc. as none of these are declared const` even though they are not changing the object value.
Expected Behavior
row_length(), col_length() and other methods not changing the object should run when called using a const Matrix object.
Actual Behavior
row_length(), col_length() and other methods not changing the object give error when when called using a const Matrix object.
Possible Fix
Add const keyword to methods which will not change the object value.
Note: You can contact @ashok-arora if you face any problem while solving this issue.
It is impossible to work with
const Matrixobjects as none of the methods are declaredconst.Description
Using a
const Matrixobject I can't even call basic methods likerow_length(),col_length(),print(), etc. as none of these are declaredconst` even though they are not changing the object value.Expected Behavior
row_length(),col_length()and other methods not changing the object should run when called using aconst Matrixobject.Actual Behavior
row_length(),col_length()and other methods not changing the object give error when when called using aconst Matrixobject.Possible Fix
Add
constkeyword to methods which will not change the object value.