- Russell Hanneken rg ** ****** @ pobox.com 从我的地址中删除g以向我发送邮件。 2004年4月27日星期二22:44:05 GMT,猴子爪子 < fm ************* @ yahoo.com>写道: 请参阅 http://www.eskimo.com/~scs/C-faq/top.html (第6节) 或google档案。这至少每月讨论一次。 <<删除电子邮件的del>> I am passing an array to a function. My first attempt was like so:char *ary[] = {"an", "array"};my_sort(ary);But that doesn''t work because the function my_sort cannotdeterming the size of ary. So i had to do this:nelems = sizeof(ary) / sizeof(char *);my_sort(ary, nelems);Why is this? 解决方案This is addressed in the FAQ: http://www.eskimo.com/~scs/C-faq/q6.21.html--Russell Hanneken rg********@pobox.comRemove the ''g'' from my address to send me mail.See the faq at http://www.eskimo.com/~scs/C-faq/top.html (section 6)or google the archives. This gets discussed at least monthly.<<Remove the del for email>> 这篇关于传递数组作为参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-23 13:46