Quote Originally Posted by monarch_dodra View Post
I could be wrong:

(1) What you are passing is not a pointer to an array, but an array of pointers, so:
(2) In c++ arrays are always implicitly passed by reference.

I'd like someone more experienced to confirm though.
Oh.. I missed that. Thank you very much.

Quote Originally Posted by treuss View Post
Your program does not work perfectly, it leaks memory. While this may not be noticable during short tests it certainly is a defect.

When passing arrays to a function, arrays degenerate to pointers to their first element. There is no need to pass these pointers by reference as the pointers themselves are not changed by the function, neither would it be faster.
Why my program is not working perfectly?


Also is it same *& and &* ??