Jump to content
  • Advertisement
Sign in to follow this  
Kaczor_90

Matrix in C++

This topic is 3034 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
Advertisement
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
Quote:
Original post by Kaczor_90
To enter the matrix of size m x n?
What exactly don't you understand about this? Show us what you have tried.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!