+ 1
Return array
int (&fillarr(int (&arr) [5] ))[5] { return arr;} Can somebody explain how this code works, I was searching for how to return an array in a function and I got this
3 Answers
0
Have you verified the validity of the code? Idk but I think it has too many parentheses, and there's only `return arr;` in the function body.
Why not use vector? it will be a lot easier.
0
Ipang I used vector in my code but it has a max size limit and didnt work for really big inputs
0
What did you mean max size limit? vector is dynamic container and is very capable for holding large amount of data.
Share your code?