AhmedSadek60 / AsuMathLabG19

A c++ program for carrying out matrix operations.
4 stars 2 forks source link

Program Terminates When making multiply or division operation #4

Closed mohamedelshorbagy closed 6 years ago

mohamedelshorbagy commented 6 years ago

When using operation like * or / if matrices is not square it terminates all the program and I just want to have a little message telling me the operation can't be done

1111

amr-galal commented 6 years ago

When the matrix is not invertible it throws an error: image

But we only need a message telling the user that the matrix is just not invertible and division can't be done, right? Now that's easy

As for the multiplication, it's valid: 3 x 1 * 1 x 3, should return a 3 x 3 matrix. So the problem here is different!

mohamedelshorbagy commented 6 years ago

Yes , That's Right firstly finish the Division then finish the Multiplication Problem

amr-galal commented 6 years ago

Handled diving by a non square matrix here in the second attempt: image

Now the first attempt is an error thrown from mul() function because I'm multiplying: 1 x 3 * 2 x 3