Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <iostream>
- #include <ostream>
- #include <istream>
- #include <iomanip>
- using namespace std;
- class Matrix
- {
- //Our Friend Functions
- friend ostream& operator<<(ostream&, const Matrix&);
- friend istream& operator>>(istream&, Matrix&);
- friend Matrix operator-(Matrix&, Matrix&);
- friend bool operator!=(Matrix&, Matrix&);
- private:
- int rows, columns;
- double** p;
- public:
- //Functions
- void Set(int, int);
- void Print();
- void getDimensions(int &, int &) const;
- double** getPointer() const;
- //Instructions
- Matrix(int = 3, int = 3);
- ~Matrix();
- Matrix(const Matrix&);
- //Overriden Methods
- //Mathematical Operations
- Matrix operator+(const Matrix&);
- Matrix operator*(const Matrix&);
- Matrix operator*= (const Matrix&);
- //Logical Operations
- bool operator==(const Matrix&);
- //Assigning Operations
- Matrix& operator=(const Matrix&);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement