// Compile: g++ -o tvec tvec.cxx myvec.cxx // #include #include "myvec.h" using namespace std; int main() { My3Vector a(1.,1.,0.); My3Vector b(-1.,1.,0.5); cout << "Length a = " << a.Length() << endl; cout << "Length b = " << b.Length() << endl; cout << "a Dot b = " << a.Dot(b) << endl; cout << "angle a, b = " << a.Angle(b) << endl; My3Vector c = a + b; cout << " c = " << c << endl; c = c * 2.; cout << " c = " << c << endl; c = 1.111 * c; cout << " c = " << c << endl; }