I'm using Dev C++ as IDE, windows 10 and this is the code
#include<stdio.h>
main(){
FILE *f;
f=fopen("C:\\Users\\min2\\Documents\\asd.txt", "w"); //(did not work)
//f=fopen("C:/Users/min2/Documents/asd.txt", "w"); (did not work)
//f=fopen("asd.txt", "w"); (did not work)
if(f==NULL)printf("Did not work"); //this is what im getting in the console
else printf("It worked");
fclose(f);
}
It's not creating the .txt. I'm trying to do it in the documents. I tried on the desk but its not working either. It does not create the file.