Return an array without specifying size

is it possible to return an array from a function without define it's size
eg:
fn create_array() -> [[usize; 50]; 50]

here we specify size of array as 50 before return it

No, if you don't want to specify the size of the array, use a Vec instead

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.