online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
struct Item { count: usize, } impl Item { pub fn count(&self) -> usize { return self.count; } } impl From<&str> for Item { fn from(value: &str) -> Self { return Self { count: value.len() }; } } struct Factory; impl Factory { pub fn new() -> Self { return Self {}; } pub fn get<'a, T>(&'a self, value: &'a str) -> T where T: From<&'a str> { let value_parsed = value.chars().rev().collect::<String>(); return T::from(&value_parsed); } } pub fn main() { let factory = Factory::new(); println!("{}", factory.get::<Item>("hi").count()); }

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