Hello I am trying to create a 2D vector in rust simply by making a vector of vectors and then printing it in a 2D form.
Code:
fn draw_grid(grid:&Vec<Vec<i32>>){
for r in 0..grid.len(){
for c in 0..grid.len(){
print!("{}", grid[r[c]]);
}
}
error:
error[E0608]: cannot index into a value of type `usize`
As you can see the compiler doesn't like it when I try to index it like a normal vector. Your help is greatly appreciated :)