Sign in to follow this  

Matrix in C++

This topic is 2814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Implement a class matrix, which will be represented integer matrices of size mx n. Define default constructor, copying, creating a matrix filled with values, "value" given as a parameter, and creates zero matrix. Implement methods to add, subtract, multiply 2 matrix, scalar multiplication, transposition, compare and display matrix. Please do not use global variables. Choosing a job to implementation should be available from the menu. I have a problem with this task. To enter the matrix of size m x n? For the rest I think you can manage somehow. But, I have very little problem, and without that no further moves.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kaczor_90
To enter the matrix of size m x n?


I'm not sure I understood your question, but I'm guessing the Matrix class should have a constructor that takes m and n as parameters.

Share this post


Link to post
Share on other sites
for(;;;)
for(;;;)
matrix[x][y] = number;
I do not know just what to give the conditions in the loop and whether or not good I think. I want all those placing rows and columns to work properly

Share this post


Link to post
Share on other sites
(captain obvious) Homework alert! :-)

Google for the kajilions of already written generic matrix implementations and copy..er, inspire yourself with one.

Share this post


Link to post
Share on other sites

This topic is 2814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this