I'm getting gcc errors when I compile my code. The errors are about "passing argument 1 of ‘print_path’ makes pointer from integer without a cast".
Here is my function prototype:
void print_path(int previous[], int desired_node_index);
Here is my function:
void print_path(int previous[], int desired_node_index)
{
if( previous[desired_node_index] != -1 )
print_path( previous[desired_node_index] );
printf("-> %d ", previous[desired_node_index]);
}
and here is where I call my function:
print_path(previous, dest_index);
I'm obviously passing it in wrong, or else I'm doing something incorrectly about how to pass an array into a function. Any help?
Thanks guys!