online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <vector> template<typename iter> void bubbleSort(iter start, iter end) { for (iter i = start; i != end; i++) { for (iter j = i; j != end; j++) { if(i == j) { continue; } if (*i > *j) { std::iter_swap(i, j); } } } std::cout << "ended" << std::endl; } int main() { std::vector<int> vector = {200, 2, 100, 11, 7, 23, 3, 55, 6, 40, 5, 2, 1, 50}; std::vector<int> temp = vector; bubbleSort(vector.begin(), vector.end()); for (auto &num : vector) { std::cout << num << std::endl; } }

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