summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 0f91611..e0e97c3 100644
--- a/main.cpp
+++ b/main.cpp
@@ -20,11 +20,12 @@ int main()
other.push_back(8);
std::for_each(other.begin(), other.end(), print);
std::cout << std::endl;
- const vector<int> constvec(other.rbegin(), other.rend());
+ const vector<int> constvec(other);
std::for_each(constvec.rbegin(), constvec.rend(), print);
+ std::for_each(constvec.begin(), constvec.end(), print);
std::cout << std::endl;
other.pop_back();
- std::for_each(other.begin(), other.end(), print);
+ std::for_each(other.rbegin(), other.rend(), print);
std::cout << std::endl;
std::cout << "comparaisons" << std::endl;
std::cout << (vec == other) << std::endl;