diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |