Created
April 1, 2022 02:16
-
-
Save jcar787/99c87dee2b4333d246d0e1fcc55e9942 to your computer and use it in GitHub Desktop.
Showing an example of Vectors
This file contains hidden or 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 main() { | |
let mut my_vec: Vec<i32> = Vec::new(); // my_vec = [] | |
my_vec.push(7); // my_vec = [7] | |
my_vec.push(8); // my_vec = [7, 8] | |
my_vec.push(7); // my_vec = [7, 8, 7] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment