Hi,
I am writing a file by using fopen("xxxx.csv","a").
However, at a point when i open the same file it gives debug assertion error. The code is the following;
I checked if anything, like "helloworld",can be written, but no. The "ENTER??" part is written in the file correctly for 5 times. But in the 6th time, the error is encountered. Sometihng odd happens at the same point in the run. the code looks like:
Thanks for any help!
if(((W_hybrid+CT)*actnoofstations+toplam_inc_cost*1.4)<overallbestcost)
{
best_pf_scheme=fopen("best_pf_tuple.txt","a");
int sayl_pf, sayj;
//fprintf(tuple,"KK- N tuple list list:;");
//fprintf(best_pf_scheme,"PF- N tuple list list:;");
printf("problem!!!!!!!!!!!!");
fprintf(best_pf_scheme,"ENTER??;");
for(sayl_pf=0;sayl_pf<actnoofstations;sayl_pf++)
{
printf("%d_",arr_pf[sayl_pf]);
fprintf(best_pf_scheme,"%d_",arr_pf[sayl_pf]);
}
fprintf(best_pf_scheme,";");
//fprintf(best_pf_scheme,";Pass--list..;");
for(sayj=0;sayj<N;sayj++)
{
if((task[sayj].pass==1)&&(task[sayj].dummy==0))
{
fprintf(best_pf_scheme,"%d ",sayj);
}
}
fprintf(best_pf_scheme,";");
overallbestcost=(W_hybrid+CT)*actnoofstations+toplam_inc_cost*1.4;
printf("\nOVERALL BEST\n");
}