Re: I have a problem in my study



On 30 Oct 2006 01:54:09 -0800, in comp.lang.c , qazwsx746@xxxxxxxx
wrote:

I use operating systems of windows xp ,
and compiler is trubo c 3.0
when I input data,the following program can't be exited.
what happen to this program?
Is the wrong with the compiler?

#include <stdio.h>
main(int argc,char *argv[])
{ FILE *fp;
void filecopy(FILE *,FILE *);

its normal to declare function prototypes outside main. C doesn't have
the idea of local function definitions.

while ((c=getc(ifp))!=EOF)

how do you signal EOF? Remember, its not a character, its a signal.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
.