Commit 30fb97d051757b12dc6faf7f72ad561076d9739d

Authored by Grzegorz Jabłoński
1 parent 0853575c

Added vector comparison example.

examples09/00-vector/makefile
1 -all: vector1 vector2 vector3 1 +all: vector1 vector2 vector3 vector4
2 2
3 vector1: vector1.o 3 vector1: vector1.o
4 g++ -g -Wall -pedantic $^ -o $@ 4 g++ -g -Wall -pedantic $^ -o $@
@@ -18,8 +18,14 @@ vector3: vector3.o @@ -18,8 +18,14 @@ vector3: vector3.o
18 vector3.o: vector3.cpp 18 vector3.o: vector3.cpp
19 g++ -g -c -Wall -pedantic $< -o $@ 19 g++ -g -c -Wall -pedantic $< -o $@
20 20
  21 +vector4: vector4.o
  22 + g++ -g -Wall -pedantic $^ -o $@
  23 +
  24 +vector4.o: vector4.cpp
  25 + g++ -g -c -Wall -pedantic $< -o $@
  26 +
21 27
22 .PHONY: clean 28 .PHONY: clean
23 29
24 clean: 30 clean:
25 - -rm vector1.o vector1 vector2.o vector2 vector3.o vector3  
26 \ No newline at end of file 31 \ No newline at end of file
  32 + -rm vector1.o vector1 vector2.o vector2 vector3.o vector3 vector4.o vector4
examples09/00-vector/vector4.cpp 0 → 100644
  1 +#include <iostream>
  2 +#include <vector> // for vector template definition
  3 +#include <iomanip>
  4 +using namespace std;
  5 +
  6 +int
  7 +main ()
  8 +{
  9 + vector<int> a;
  10 + vector<int> b;
  11 +
  12 + a.push_back(3);
  13 + b.push_back(4);
  14 +
  15 + cout << (a<b) << endl;
  16 +}
  17 +
examples09/05-unordered_set/makefile
@@ -16,4 +16,4 @@ unoredered_set2.o: unordered_set2.cpp employee.h @@ -16,4 +16,4 @@ unoredered_set2.o: unordered_set2.cpp employee.h
16 .PHONY: clean 16 .PHONY: clean
17 17
18 clean: 18 clean:
19 - -rm unordered_set.o unordered_set  
20 \ No newline at end of file 19 \ No newline at end of file
  20 + -rm unordered_set.o unordered_set unordered_set2.o unordered_set2
21 \ No newline at end of file 21 \ No newline at end of file