blob: ab5df9e2ba5aa9241d8785cf6eccbb70c3bbe2c9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <iostream>
class Matrix {
int values[4];
void addBy(int amount);
public:
Matrix(int a, int b, int c, int d);
Matrix& operator++();
Matrix operator++(int);
Matrix& operator--();
Matrix operator--(int);
Matrix& operator+=(const Matrix& rhs);
Matrix& operator-=(const Matrix& rhs);
Matrix& operator*=(const Matrix& rhs);
friend Matrix operator+(const Matrix& lhs, const Matrix& rhs);
friend Matrix operator-(const Matrix& lhs, const Matrix& rhs);
friend Matrix operator*(const Matrix& lhs, const Matrix& rhs);
friend std::ostream& operator<<(std::ostream& lhs, const Matrix& rhs);
friend std::istream& operator>>(std::istream& lhs, Matrix& rhs);
};
|