i had made a thread yesterday where i had problems with passing values to a struct. Now, i fixed that but, i can't open the files.(i have started programming on linux)
Here is the code
Code:
void read_inputs(bankT array[],int size,FILE* input_file){
int i,nscan;
char termch;
for(i=0; i<size; i++){
nscan = fscanf(input_file,"%30[^,], %d, %lf, %d%c",array[i].epwnymo,&array[i].ypolipo,&array[i].epitokio,&array[i].hmeromhnia,&termch);
if (nscan == EOF) break;
if (nscan != 5 || termch != '\n'){
Error("Improper file format");
}
}
I get the "Improper file format" even though the results with debugging are:
Code:
nscan = 5
termch= 10'\n'
Sorry for many posts, but since i am new to linux, i have some troubles