I'm using cygwin to compile and windows 10. My question is whenever I try to compile I get an error saying:
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot open output file a.exe: Permission denied collect2: error: ld returned 1 exit status
It started when I compiled a program that creates a file and then writes to that file, but I don't know why my computer doesn't allow me to create a file in a program. I have no idea how to fix it so I can write to file. Any help is appreciated.