I have a function declared like so:
int func( int file_num, int a, int l, int g );
I decided to change this so it could accept another parameter:
and call the function like so:PHP Code:
int func( int file_num, int a, int l, int g , int o);
However now, with that extra parameter, i get a segmentation fault.PHP Code:
func(num_of_files, l, a, g, o)
There is a strcpy in this function, where i copy file/dir names to an array. That array gets passed to qsort, and then onwards to another function to be printed.
The array is declared like so:
when i take the strcpy function out, i dont get a core dump.PHP Code:
char Array[file_num]; /* probably not the best way, but il leae it for the moment */
Are there common problems when passing more parameters to functions like im trying to do?