Skip to content

Instantly share code, notes, and snippets.

@jcar787
Created April 1, 2022 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcar787/99c87dee2b4333d246d0e1fcc55e9942 to your computer and use it in GitHub Desktop.
Save jcar787/99c87dee2b4333d246d0e1fcc55e9942 to your computer and use it in GitHub Desktop.
Showing an example of Vectors
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