online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <string> #include <algorithm> using namespace std; void permutations(string str, int i, int j, string temp){ if (i == j){ if (str.compare(temp) > 0){ cout << str << endl; } } for (int k = i; k <= j; k++){ swap(str[i], str[k]); permutations(str, i + 1, j, temp); swap(str[i], str[k]); } } int main(){ string str; cin >> str; int len = str.length(); // if (next_permutation(str.begin(), str.end())){ // cout << str << endl; // } permutations(str, 0, len - 1, str); }

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