online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <set> void print(int x, int y) { int individual_number1 = 0, individual_number2 = 0; std::set<int> myset; int savey = y;//this will be used to reset y when the 2nd do while loop finishes do { individual_number1 = x % 10; do { individual_number2 = y % 10; if(individual_number1 == individual_number2) { myset.insert(individual_number1); break; } y = y / 10; }while( y > 0); y = savey; x = x / 10; } while (x > 0); //print out the element of the set for(int i: myset) { std::cout<<i<<" "; } } int main() { int x = 1234, y = 41567; print(x, y); return 0; }

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