I have a project to have a file read using argc and argv. Then sort it and do some other things. I'm having trouble with the very first step. Loading the file. This is what I have so far. Any help you be great.
#include <stdio.h>
#include <stdbool.h>
void openFile(int argc, char *argv[]);
int main(int argc, char *argv[])
{
openFile(argc, argv);
printf("\n\n");
return 0;
}
void openFile(int argc, char *argv[])
{
int i;
printf("\nThe number of arguments is %d", argc);
printf("\nThe name of the program is %s", argv[0]);
for ( i = 1; i < argc; i++)
printf("\nUser value No. %d: %s", i, argv[i]);
}