By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,227 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,227 IT Pros & Developers. It's quick & easy.

Comparing Matrix's C++

P: 17
I am trying to find our how I would compare two matrix's.

I have two matrix and I want to find out if they are equal, less or greater than.

I created a double loop to loop through and compare an individual element.

Expand|Select|Wrap|Line Numbers
  1. for(int row = 0; row < Number; row++)
  2. {
  3.     for (int col = 0; col < Number; col++)
  4.     {
  5.         if(a.matrix[row][col] == b.matrix[row][col];
  6.     }
  7. }
This compares the individual element but how would I compare the entire matrix and determine which one is greater or less?
Mar 13 '07 #1
Share this Question
Share on Google+
1 Reply

P: 1,646
That depends entirely on your criteria for what is greater
Mar 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.