I need a way for the user to enter a file name and i am able to open it with in the loop i am doing something like
fopen ("%s", file_name, "r");
thanks for the help
I need a way for the user to enter a file name and i am able to open it with in the loop i am doing something like
fopen ("%s", file_name, "r");
thanks for the help
What you need to do is store the file name into a string and then open that string.
char FileName[128] = "test.txt";
FILE *infile = fopen(FileName, "r");
This will open the file. You do not need to use "%s" like you do in printf.
If cities were built like software is built, the first woodpecker to come along would level civilization.
Black Frog Studios