This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Ask a unix c question, A function: void funct(char* argv[])
I need to know how many array elements actually passed in for each call of this function, is there a easy way to do it?
Thanks
-satine(satine);
2002-6-28
(#606030@0)
-
up
-satine(satine);
2002-6-28
(#606290@0)
-
n=sizeof(p)/sizeof(char*)Test under VC:
int main(int argc, char* argv[])
{
char *p[]={"111", "222","333"};
printf("%d\n", sizeof(p)/sizeof(char*));
return 0;
}
-interview(intervieweree);
2002-6-28
{161}
(#606810@0)