i would be plzed that some1 tells me why doesn't my program run?and gives this massege "could not creat process!"
Code:#include<stdio.h> #include<stdlib.h> #include<conio.h> struct list { char alph; int freq; }; struct list a[256]; /////////////////////////////////////////////////////////////// int main(){ int j,m,f,k; FILE *fin; char ch; clrscr(); fin=fopen("a:test.txt","wt"); printf("\n enter characters($ for end):"); do{ ch=getchar(); putc(ch,fin); }while(ch!='$'); fclose(fin); fin=fopen("a:test.txt","rt"); for(j=0,m=0;j<256;j++) { f=0;k=0; while((ch=getc(fin))!=EOF) { if(ch==j) { f=1; a[m].alph=ch; k++; } } if(f==1){ a[m].freq =k; m++; } rewind(fin); } fclose(fin); getch(); return 0; }



LinkBack URL
About LinkBacks


