Created
March 17, 2017 11:10
-
-
Save ashiato45/c009cd2e8f6929c18c4a7f0e4e95ec48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn f(a: &mut i32){ | |
*a += 1; | |
} | |
fn main() { | |
let mut a: i32 = 3; | |
println!("Hello, world! The number is {}", a); | |
f(&mut a); | |
println!("The number is {}", a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment