give me an error when I put it outside main, I need to use the file in some fucntions. Why?Code:FILE *indata=fopen("c:\\input.txt","r");
but when I put
outside main, andCode:FILE *indata
[code] indata=fopen("c:\\input.txt","r"); [code]
inside main, the program and fucntions run perfectly, why can't I put the whole thing outside main?