Passing array by ref.

Posted by atch on Stack Overflow See other posts from Stack Overflow or by atch
Published on 2010-04-02T10:43:06Z Indexed on 2010/04/02 10:53 UTC
Read the original article Hit count: 554

Ref. to my last post and sellibitze's comment to that post on passing array by ref rather than by value, why is it that when I'm passing array by value compiler can deduce arguments but it won't do it if I pass it by value?

@Paul So just to make it clear when I'm declaring fnc:

void f(int a[]);//I'm passing a pointer

but when I'm declaring:

void f(int &a[]);//I'm passing a ref?

Do I understand this correctly now?

© Stack Overflow or respective owner

Related posts about c++

Related posts about argument-passing