|
|
|
@ -21,7 +21,25 @@ int main() {
|
|
|
|
|
cout << v << endl;
|
|
|
|
|
cout << "w:" << endl;
|
|
|
|
|
cout << w << endl;
|
|
|
|
|
cout << "v + w:" << endl;
|
|
|
|
|
cout << v + w << endl;
|
|
|
|
|
cout << "v - w:" << endl;
|
|
|
|
|
cout << v - w << endl;
|
|
|
|
|
cout << "v * w:" << endl;
|
|
|
|
|
cout << v * w << endl;
|
|
|
|
|
cout << "w * i:" << endl;
|
|
|
|
|
cout << w * i << endl;
|
|
|
|
|
for (long long j = 0; j < v.get_dimention(); j++) {
|
|
|
|
|
cout << "Element " << j << " of v:" << endl;
|
|
|
|
|
cout << v[j] << endl;
|
|
|
|
|
}
|
|
|
|
|
cout << "A temp vector of dimension 3" << endl << vector(3) << endl ;
|
|
|
|
|
vector k = vector(3);
|
|
|
|
|
k = w;
|
|
|
|
|
cout << "Assignment of w to k" << endl << k << endl ;
|
|
|
|
|
cout << "Manually set elements of k to elements of v" << endl;
|
|
|
|
|
for (long long j = 0; j < v.get_dimention(); j++)
|
|
|
|
|
k[j] = v[j];
|
|
|
|
|
cout << k << endl;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|