Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
No, the address of the array is passed into passArray.

(you may be thinking of passing a struct)

I wasn't thinking of passing a struct. It looks like a pass-by-value construct, what with having a size specified and all.

I just put this in the compiler. I fully expected the compiler to push a fifty element array onto the stack. But as you say, it passed a pointer instead. The compiler didn't it even warn me when passing an array of a different size. :eek:

My apologies DMI. I did think it odd you'd make this kind of "mistake".
 
Thanks, I have not come up to the 'strcpy' yet in the book. I have a good under standing of structs and was seeing if I could do it. I think I will move on to the next part 'malloc'

Thanks again

-Lars
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.