online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <vector> #include <iterator> #include <algorithm> int main() { std::vector<int> data = { 3, 7, 5, 8, 7, 2, 9, 4, 1, 7, 6, 0 }; std::sort(std::begin(data), std::end(data)); copy(std::begin(data), std::end(data), std::ostream_iterator<int>(std::cout, " ")); std::cout << '\n'; int val = 7; bool found = std::binary_search(std::begin(data), std::end(data), val); std::cout << val << " " << (found ? "found" : "not found") << '\n'; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue