The code I have is as follows:
FILE *txt_file = fopen(\"data.txt\", \"r\"); if (txt_file == NULL) { perror(\"Can\'t open file\"); }
Th
My problem was that I had a file filename.txt and I didn't realize that in reality it was filename.txt.txt due to windows not showing the extension.