-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (27 loc) · 668 Bytes
/
Copy pathmain.cpp
File metadata and controls
37 lines (27 loc) · 668 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
#include<iostream>
#include "../../inc/vector.h"
int main(){
Vector<int> v; // default vector : origin (0,0,0)
// input coordinates
std::cin >> v;
std::cout << v;
// parameterized constructor
Vector<double> d(14.444,15,2323);
// assignment
Vector<double> e = d;
Vector<double> f(d);
v++; // post increment
v--; // post decrement
// utilites
int xCoordinate = v.GetX();
int yCoordinate = v.GetY();
int zCoordinate = v.GetZ();
Vector<int> v1(14,14.232,44);
Vector<int> v2(11,112,10);
// compound assignment
v1 += v2;
v1 -= v2;
v1 *= v2;
v1.Print(); // NOTE : i recommend using cout << v1 <<; instead
return 0;
}