I am working on a program, part of which is opening a file.
As I expect the program to check if the (text) file contain certain data. That's why it would be useful if program users could enter the file to check.
I've tried to do it by combining writing the printf and fopen with r option, but the compiler returners error messages.
This is what I have 'created':
printf("Select the file to open:");
fopen("%d", a , "r")
Can anyone tell me if it is possible to get my idea across to PC so that the program runs correctly?
Thanks for all replies.