i would be plzed that some1 tells me why doesn't my program run?and gives this massege "could not creat process!"

#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;
}

Recommended Answers

All 3 Replies

forgot to say
i'm using win xp and turbo c++ and saved my program with the extension CPP.i compiled my program and it doesn't have any errors!

appreciate your help

Member Avatar for Siersan

fin=fopen("a:test.txt","wt");

Perhaps you meant

fin=fopen("a:\\test.txt","wt");

and

fin=fopen("a:\\test.txt","rt");

I'm not familiar at all with Turbo C++, but maybe check the settings for the compiled application such as machine, stack, heap etc. It could be one of the parameters required by executable header is incorrect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.