#include #include using namespace std; #include "vec3.h" int main() { vector u; vector v( 3.14, 2.73, 0.69 ); vector w = vector( -5, 8, -9 ); cout.setf( ios::showpoint ); cout.setf( ios::fixed ); cout.precision( 3 ); u = vector( 3, 4, 5 ); show( "u", u ); show( "v", v ); show( "w", w ); cout << endl;; w.assign( 3, 3.14 ); show( "w", w ); cout << endl; v.assign( 6.5, 7.19, 0.91 ); show( "v", v ); v.assign( 2.0, 1.0 ); show( "v", v ); cout << "The 3rd component of v is " << v.entry(3) << endl << endl; assign( v, -1, -2, 5 ); show( "v", v ); cout << "\n\n"; system( "PAUSE" ); return( EXIT_SUCCESS ); }