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

problem here

P: 7
solve it in C++,,,,,,

Write a program which overloads a binary Minus (-) operator,
The program will contain a class Matrix, This class will contain a private data member Array[][] which store int values. The class will further contain a Default constructor, get() function which takes values for array from the user and also contain a Display function witch display the array on the screen,
In main function create three objects Mat1, Mat2, Mat3 of this class, first call get() and Display() functions with Mat1 and Mat2 objects then implement the statement Mat3 = Mat1 - Mat2; and call Display() function with Mat3.



Note: The matrix should be 2x2.
Jun 20 '07 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
solve it in C++,,,,,,

Write a program which overloads a binary Minus (-) operator,
The program will contain a class Matrix, This class will contain a private data member Array[][] which store int values. The class will further contain a Default constructor, get() function which takes values for array from the user and also contain a Display function witch display the array on the screen,
In main function create three objects Mat1, Mat2, Mat3 of this class, first call get() and Display() functions with Mat1 and Mat2 objects then implement the statement Mat3 = Mat1 - Mat2; and call Display() function with Mat3.



Note: The matrix should be 2x2.
Please read the posting guidelines. We don't help people to cheat on homework here.
Jun 20 '07 #2

Post your reply

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