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

#define ArraySize 10

int main() {
    
    Vectorclass v1;
    Vectorclass v2(ArraySize);    
    
    float *testvec;
    
    cout << " Print first vector " << endl;
    v1.printv();
    cout << " Print second vector " << endl;
    v2.printv();
    cout << endl;
    
    testvec = new float[ArraySize];
    for (int i=0; i<ArraySize; i++) testvec[i] = i*2;
             
// Cannot copy testvec to v1 cause they have different dimensions
    v1.set(testvec,ArraySize);
    cout << endl;

// Copy testvec to v2
    v2.set(testvec,ArraySize);
    cout << " Print second vector " << endl;
    v2.printv();
    cout << endl;
    
// Cannot change the 23rd index of vector v2 (dimension error)
    v2.setvalue(22, 12.34);        
    cout << endl;

// Change the 3rd index of vector v2
    v2.setvalue(2, 12.34);        
    cout << " Print second vector " << endl;
    v2.printv();
    
    delete[] testvec;
    
    std::cin.get();
    return (0);
}
