I first made a very simple program to read what is written in a .txt file. This one:
#include <stdio.h>
main()
{
int N;
FILE *fp;
fp=fopen("c:\\baba.txt","r");
while(!feof(fp)){
fscanf(fp,"%c",&N);
if(feof(fp))break;
printf("%c",N);
}
printf ("\n");
}
I then wanted to ask the user the adress of the file he wants to read so that the program could read any .txt file I ask...
Not so simple! I don't really know how to scan a string...
I thought about something like:
Printf("Enter the location of the file you want to open:");
sscanf(...);
I dont really know how to use sscanf....
Please HELP !
Thank you by advance