Home > Back-end >  This how to write, left a lot of course, can't write, such as online is quite urgent
This how to write, left a lot of course, can't write, such as online is quite urgent

Time:09-23

Define Matrix Matrix class, including the following members:
1. The private data members, two dimensional integer array, two lines of three columns,
2. The no-arg constructor, the private data members of element is initialized to 0,
3. There are two dimensional integer array type parameter constructor, using arguments to initialize the private data members,
4. Overloading "+" operator, the addition of Matrix class objects, using overloaded member function implementation,
5. Insert the operator overloading flow "& lt; <" And flow extracting operators & gt;" & gt;" , the realization of the Matrix object formatted output, input assignment, use a friend function overloading,

Complete the following functions in the main function:
1. Define the Matrix class object m1 and m2, invoking the default constructor complete initialization,
2. Define a 2 d integer array, and initialize,
3. Define a Matrix class object m3, and call a constructor, using the above definition of integer array as the argument to complete initialization,
4. Use the stream extraction operator & gt;" & gt;" Input values to the m2 object,
5. Use the "+" operator, calculate the m2 + m3, and the results will be assigned to the m1,
6. Statement execution "cout
  • Related