Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3. #include <ostream>
  4. #include <istream>
  5. #include <iomanip>
  6. using namespace std;
  7. class Matrix
  8. {
  9. //Our Friend Functions
  10. friend ostream& operator<<(ostream&, const Matrix&);
  11. friend istream& operator>>(istream&, Matrix&);
  12. friend Matrix operator-(Matrix&, Matrix&);
  13. friend bool operator!=(Matrix&, Matrix&);
  14.  
  15. private:
  16. int rows, columns;
  17. double** p;
  18.  
  19. public:
  20. //Functions
  21. void Set(int, int);
  22. void Print();
  23. void getDimensions(int &, int &) const;
  24. double** getPointer() const;
  25.  
  26. //Instructions
  27. Matrix(int = 3, int = 3);
  28. ~Matrix();
  29. Matrix(const Matrix&);
  30.  
  31. //Overriden Methods
  32.  
  33. //Mathematical Operations
  34. Matrix operator+(const Matrix&);
  35. Matrix operator*(const Matrix&);
  36. Matrix operator*= (const Matrix&);
  37.  
  38. //Logical Operations
  39. bool operator==(const Matrix&);
  40.  
  41. //Assigning Operations
  42. Matrix& operator=(const Matrix&);
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement