Bonkers

Lusercop `the.lusercop' at lusercop.net
Fri May 11 15:44:18 BST 2007


On Fri, May 11, 2007 at 02:04:45PM +0100, Nigel Rantor wrote:
> Jon Nangle wrote:
>> On Fri, May 11, 2007 at 11:49:38AM +0100, Nigel Rantor wrote:
>>> example, why passing a char* rather than a char[1024] is likely to be 
>>> more efficient.
>> How do you pass a char[1024] in C? Surely arrays will always decay into
>> pointers anyway.
> Err, by value?

Could you give an example of the syntax that you use to pass an array "by
value"?

> It was an example, perhaps I should have used C++ where you might want 
> to pass large objects by value until you realise that they're huge and 
> copying them onto the stack is a performance hit.

Sure, except that in C, I can't think of the possible syntax you'd use for
doing it.

-- 
Lusercop.net - LARTing Lusers everywhere since 2002


More information about the london.pm mailing list