5.4 Le fichier main.cpp

Voici le fichier main.cpp pour faire les tests :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>

#include "Vector.h"

int main() {
	size_t size_ = 5000 ;
	Vector a(size_,1.), b(size_,2.), c(size_);
	
	c = 5. * a + 7. * b + a/2.0 ;
	a += 7. * b;
	std::cout << "c[0] = " << c[0] << std::endl;
	std::cout << "a[0] = " << a[0] << std::endl;
	std::cout << "c[1] = " << c[1] << std::endl;
	std::cout << "a[1] = " << a[1] << std::endl;
	return 0;
}