In a program I'm writing I need to prompt the user to input the name of a file to read from.
With all the examples I have found, the file name is pre-defined.
Example:
I need to replace "file.txt" with a string defined by the user, how could I do this?FILE *in;
in = fopen("file.txt", "r");
Help is appreciated.