Xref: utzoo comp.sys.amiga:34610 comp.lang.c:19045 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!watmath!grwalter From: grwalter@watmath.waterloo.edu (Fred Walter) Newsgroups: comp.sys.amiga,comp.lang.c Subject: Re: C problems Message-ID: <26647@watmath.waterloo.edu> Date: 30 May 89 17:23:03 GMT References: Reply-To: grwalter@watmath.waterloo.edu (Fred Walter) Organization: U. of Waterloo, Ontario Lines: 20 In article deven@rpi.edu (Deven Corzine) writes: >In article armhold@topaz.rutgers.edu (George Armhold) writes: >> I started using my C compiler today (Manx Aztec V3.6a), and I'm really >> frustrated with I/O. >argc is an integer, but argv is a char **. You need to add a line >after main(argc,argv) but BEFORE the "{" which reads "char **argv;" or >"char *argv[];" (take your pick; they mean the same.) and you *should* >add right before it "int argc;" As well, the following code segment has a problem... while ((c=getc(fp1)!=EOF)) putc(fp2); ^^^^^^^^^^ You really want to be using putc(c, fp2). (Not to mention adding spaces would increase the readability of your code IMHO). fred