online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <cstdint> int main() { int x = 42; // Store previous state std::ios_base::fmtflags f(std::cout.flags()); // Common hexadecimal format std::cout << std::hex; std::cout << "0x" << std::nouppercase << reinterpret_cast<uintptr_t>(&x) << '\n'; std::cout << "0X" << std::nouppercase << reinterpret_cast<uintptr_t>(&x) << '\n'; std::cout << "0x" << std::uppercase << reinterpret_cast<uintptr_t>(&x) << '\n'; std::cout << "0X" << std::uppercase << reinterpret_cast<uintptr_t>(&x) << '\n'; // Restore previous state std::cout.flags(f); }

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