+ 3
When I pass an array to a function,Is it passed by value or passed by reference?
Iām confused.When creating a function using an array as a parameter, thereās no ā&ā before the array, which means āpass by referenceā However, the function acts as if it were passed by reference.
6 Answers
+ 3
They turn implicitly into pointers, their size is unknown when passed to a function and they don't match with the stl container design so that they're lacking consistency.
And if you make them 2d, it's even worse.
+ 1
Do you use the array class or low level bad practice C arrays?
0
C++