online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online Rust Compiler. Code, Compile, Run and Debug Rust program online. Write your code in this editor and press "Run" button to execute it. *******************************************************************************/ struct A {} struct C {} struct B {} impl A { fn foo(self) -> u8 { 1 } } impl B { fn foo(self) -> u8 { 2 } } impl C { fn foo(self) -> u8 { 3 } } struct ABC { a: A, b: B, c: C, } impl ABC { fn new() -> Self { Self { a: A{}, b: B{}, c: C{}, } } fn foo(self) -> u8 { let sum = self.a.foo() + self.b.foo() + self.c.foo(); sum } } fn main() { let abc = ABC::new().foo(); println!("{}", abc); }

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