online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ // Example program #include <iostream> #include <string> int val1 = 1; int val2 = 2; int* valPtr = &val1; int& valRef = val1; void PrintValues() { std::cout << "Values: " << std::endl; std::cout << "val1: " << val1 << ", val2: " << val2 << ", valPtr: " << *valPtr << ", valRef: " << valRef << std::endl; std::cout << "Addresses: " << std::endl; std::cout << "val1: " << &val1 << ", val2: " << &val2 << ", valPtr: " << valPtr << ", valRef: " << &valRef << std::endl; } int main() { PrintValues(); valPtr = &val2; PrintValues(); *valPtr = 3; PrintValues(); valRef = 4; PrintValues(); 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