Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

how to create a vector in rust

let v: Vec<i32> = Vec::new();  // []
let v = vec![0; 3];            // [0, 0, 0]
let v = vec![1, 2, 3];         // [1, 2, 3]
 
PREVIOUS NEXT
Tagged: #create #vector #rust
ADD COMMENT
Topic
Name
3+4 =