Subj : Re: GPF With 4.52 On 2 printf????? To : borland.public.cpp.borlandcpp From : C0FFEEBAD Date : Sat Feb 26 2005 02:02 am Thanks for the answer. I had read that in my books and forgot. Guess I am sloppy. I do a little, months go by then pick it up again. The C/C++ are not very forgiving. Very tough stuff to learn for me...... "Danzer" wrote in message news:421caac2$1@newsgroups.borland.com... > 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. .