How to pass array in function
Example:
fn count(x:[u32]) -> u32 {
x.len()
}
How to pass array in function
Example:
fn count(x:[u32]) -> u32 {
x.len()
}
fn count(x: &[u32]) -> usize {
x.len()
}
Thanks
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.