online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <memory> int functionFoo (int var) { // Method 1: assign value while allocation int *ptr = new int(10); std::cout << "ptr is " << ptr << " &ptr is " << &ptr << " *ptr " << *ptr << std::endl; std::unique_ptr<int> uptr(ptr); std::cout << "Uptr.get() " << uptr.get() << " &uptr" << &uptr << " *uptr " << *uptr << std::endl; int res = *uptr; res += 1; std::cout << " res " << res << std::endl; return res; } int main() { int ret = functionFoo(23); std::cout << "functionFoo returns " << ret << std::endl; 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