Hi,
I am trying to open a file using C.
whenever i try compiling and checking what happens all I am getting is "No such file or directory" even though the file exists and i have permissions on it.Code:FILE *fp; fp = fopen("file://localhost/Users/Desktop/CPrograms/names.txt","r+"); if(fp) { printf("Yes"); } else{ perror(NULL); printf("NO"); }
Does anyone have any idea why this is happening or how to avoid such an error?
Thanks in advance