Re: I have a problem in my study
- From: Mark McIntyre <markmcintyre@xxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 23:03:44 +0000
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
.
- Follow-Ups:
- Re: I have a problem in my study
- From: Herbert Rosenau
- Re: I have a problem in my study
- References:
- I have a problem in my study
- From: qazwsx746
- I have a problem in my study
- Prev by Date: Re: C Interview Questions
- Next by Date: Re: finding how much the file system is full, from a C program?
- Previous by thread: Re: I have a problem in my study
- Next by thread: Re: I have a problem in my study
- Index(es):