Creating two dimensional arrays in Rust
Below is an example of creating 3 dimensions array, in this example we create nested vectors using syntax:vec![vec![vec![];];];
each vector has a vector elements.Example of creating two dimensional arrays in Rust
fn main() {
let (a, b, c) = (4, 5, 6);
let mut arr = vec![vec![vec![0.0f64; a]; b]; c];
arr[1][2][3] = 1.0;
let x = arr[1][2][3];
println!("{}", x);
}
Output
1