online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include<iostream> #include <string> void swap (std::string &x,std::string &y) { std::string temp = x; x = y; y = temp; } int main() { std::string x = "geeksquiz"; std::string y = "geeksforgeeks"; swap(x, y); //pass arguments by reference std::cout<<x << " "<<y; }

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