I don't really know how to ask this...
Supposed I want to read a file from my function, but I have no idea what will be the filename that I want to read because the filename will be passed in my main function as command line argument (argv[])
so my main looks like :
int main(int argc, char *argv[])
my function will look like:
int get_corners(FILE *input, int size, and so on)
What I've tried in my function:
*input = fopen(argv[1], "r");
but, compiler said it doesn't recognize variable argv
So, can someone please help me understand how to call input file when you are not in main and have to deal with command line parameter?