CppDumping/OopAssignments/ass1/mat.h
marguesto 9eae33c31e 1st
2022-06-27 19:28:44 +02:00

29 lines
577 B
C++

#ifndef MAT_H
#define MAT_H
#include <iostream>
#include <type_traits>
#include <vector>
using namespace std;
class Mat{
public:
vector<int> arr;
public:
enum Exc{INCORRECTSIZE,DIFFERENTSIZES, WRONGINDEX};
Mat(const int n);
Mat(const vector<int> &a);
void setVector(const vector<int> a){ arr = a; };
int operator()(int i, int j) const;
friend Mat operator+ (Mat& a, Mat& b);
friend Mat operator* (Mat& a, Mat& b);
friend ostream& operator<< (ostream& s, const Mat& a);
};
#endif