Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
Technical facts
Operating system(s) or programming environment(s)
IDE(s):
Project type:
C++ standard:
Compiler(s):
Libraries used:
STL: GNU ISO C++ Library, version 4.9.2
Qt project file: ./CppStdEndExample1/CppStdEndExample1.pro
./CppStdEndExample1/main.cpp
#include <algorithm>
#include <cassert>
#include <vector>
int main()
{
{
int a[] { 2,1,0 };
assert(!std::is_sorted(std::begin(a),std::end(a)));
std::sort(std::begin(a),std::end(a));
assert(std::is_sorted(std::begin(a),std::end(a)));
}
{
std::vector<int> v { 2,1,0 };
assert(!std::is_sorted(std::begin(v),std::end(v)));
std::sort(std::begin(v),std::end(v));
assert(std::is_sorted(std::begin(v),std::end(v)));
}
}
|
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.

This page has been created by the tool CodeToHtml