online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/* Formatln! = format! + platform specific newline https://internals.rust-lang.org/t/formatln-format-platform-specific-newline/13798 */ fn codeOriginal() { let mut s = String::new(); let _ = writeln! ( &mut s , "{}" , 5 ); } /* Formatln! = format! + platform specific newline https://internals.rust-lang.org/t/formatln-format-platform-specific-newline/13798 */ fn codeRevised() { /* Use Trait std::fmt::Write ( Formatting Trait ) */ use std::fmt::Write; /* Allocate String Object (s) */ let mut s = String::new(); /* write formatted string into string object */ writeln! ( &mut s , "{}" , 5 ); /* println object s */ println! ( "{}" , s ); //drop allocated object s drop(s); } fn main() { codeRevised(); }

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