-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMatrix.cpp
More file actions
51 lines (34 loc) · 867 Bytes
/
Matrix.cpp
File metadata and controls
51 lines (34 loc) · 867 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "Matrix.h"
using namespace std;
int main() {
Matrix test(2, 2, 0.0);
double number = 0;
bool result = false;
//cout << result << endl;
result = test.get(0, 0, number);
cout << "Test 1" << endl;
//cout << result << endl;
if (result == true) {
//cout << number << endl;
}
bool second = false;
second = test.set(0, 0, 1.0);
if (second == true) {
double num = 0.0;
bool second_result = test.get(0, 0, num);
if (second_result == true) {
cout << num << endl;
}
}
}
/*
void Matrix::matrixMaker (num_rows(), num_cols(), fills) {
double** box = new double*[num_rows()];
for (int i = 0; i < num_rows(); i++) {
box[i] = new double[num_cols()];
for (int j = 0; j < num_cols(); j++) {
box[i][j] = double(i + 1) / double(j + 1);
}
}
}
*/