Hello I am having trouble with Code Blocks reading in files on my laptop. I have been trying to get it to work and am using a simple program to print out a number from a file, and even at the lowest level, Code Blocks seems to have trouble. I think it is a problem with my laptop though, as the exact same code works on other computers.
int main(){
FILE * ifp;
int num, i;
ifp = fopen("numbers.txt", "r");
fscanf(ifp, "%d", &num);
printf("%d", num);
return;
}
I am on windows using latest version of code blocks and the text file is in the same location as the C file.