Last active
March 17, 2017 11:10
-
-
Save ashiato45/2aa7774247fa8417d978ce04f3dffea7 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