online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/* Declare Struct Person Structure Parts:- name & age */ struct Person { name: String , age: u8 } /* Rust By Practice Get the type of given variable, return a string representation of the type e.g "i8", "u8", "i32", "u32" https://practice.rs/basic-types/numbers.html */ fn typeOf<T>(_: &T) -> String { format! ( "{}" , std::any::type_name::<T>() ) } fn main() { let personFirstname = "Walter"; let personMiddleName:&str="l."; let personLastname:&'static str = "Johnson"; let objStringEmpty = String::new(); let objStringFullname = String::from("Paul Young"); // Type of Variable - &str println! ( "Variable {0} Type is {1}" , "personLastname" , typeOf(&personLastname) ); // Type of Variable - String println! ( "Variable {0} Type is {1}" , "objStringFullname" , typeOf(&objStringFullname) ); // instantiate structure /* let objPeter1 = Person { name:"Peter" , age:5 }; */ let objPeter1 = Person { // name:"Peterson" name:"Peterson".to_string() , age:5 }; }

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