/*
It's the same program as 1.Overloading_Operators but the operations are
done isung a pointer.
*/

#include <iostream>
#include "CVector.hpp"
using namespace std;   

int main() {
    
     CVector vec1(1,2);
     CVector vec2(3,4);
     CVector *ptr;
     int ip;

// Vector Addition
     ptr = &(vec1+vec2);
     cout << " v1+v2 = ";
     ptr->printv();

// Vector substraction
     ptr = &(vec1-vec2);
     cout << " v1-v2 = ";
     ptr->printv();
     
// Inner Product
     ptr = &vec1;
     ip = (*ptr) * vec2;        
     cout << " <v1,v2> = " << ip << endl;     


// Vector norm
     vec1.set(3,4);
     cout << "\n\n Norm of vector: ";
     ptr->printv();
     cout << " is " << norm(*ptr) << endl;
         
     std::cin.get();
     return (0);       
}
             
