FILE *fp;
if ((fp = fopen("d:\\word.wj", "w"))== NULL){
fprintf(stderr, "Cannot creat file.\n");
return 1;
}
int tp;
fprintf(fp," Result:(Source file in source.wj)\n");
fprintf(fp,"type value (type:1=indent;2=var;3=digit;4=opnd;5=depart_table)\n");
fprintf(fp," %d\t",tp);
fwrite(str1[k],sizeof(char),strlen(str1[k]),fp);
fprintf(fp,"\n");
cout<<str1[k]<<endl;
}
i=0;
fclose(fp);
if(errstr[0]!='\0') cout<<"wrong chars of your input:"<<errstr<<endl;
for(k=0;k<j;k++) delete str1[k];
delete fp;
textcolor(GREEN);
cout<<"Please view the result in ";
cprintf(" d:\\word.wj");
cout<<"!\n";
cprintf("Thank you for use Wanjia's WGT.\n");
return 1;
}
再次谢谢!!!