hi. we have this project, and we have to open a file where we will get what we need to evaluate. The problem is I can't move on to my project because the eclipse (using mingw compiler) can't build my source code. Here's my source code:
#include<stdio.h>
#include<ctype.h>
#include<stdlib.h>
#include<string.h>
int main(){
FILE *filename;
char *name = NULL;
if((filename = fopen("snplc.txt","r"))== NULL){
printf("FIle could not be open");
}
else
{
while(!(feof(filename))){
fgets(name, 40, filename);
printf("%s", name);
}
}
fclose(filename);
return 0;
}
and whenever i try to build it in eclipse, it said that: "there's nothing to build". and when i try to run it, nothing shows. I dont know what happened, but when i first tried it, it was okay. and it was printing the strings in that file. but when i showed it to my partner a week later, it says there's nothing to build. i'm sure i didnt change anything. please help me!! badly need help!