Subj : Re: GPF With 4.52 On 2 printf????? To : borland.public.cpp.borlandcpp From : Danzer Date : Wed Feb 23 2005 10:08 am C0FFEEBAD wrote: > { > int c1,i,t,word1[310],sze; > FILE *fp1,*fp2; > char filename1[81],filename2[81]; > ofstream outf (filename2); > //------------------------------------------------------------------------- > (1) //printf("\n -> Sort words by size. <-\n\n"); > //......................................................................... > (2) //printf(" Enter # of chr's to be sorted out to a file : "); > > cin >> sze; sze++; > > printf(" Enter name of file to be sorted : "); > gets(filename1); You should not manipulate stdin and stdout with both C (printf and gets) and C++ (>> operator) in the same program. I bet using all C or all C++ will remove your GPF. .