Date: Sun, 2 Nov 1997 19:39:39 +0530 (IST) From: "Mahadevan R." Reply-To: "Mahadevan R." To: "Klywarre (THE AVATAR)" Cc: djgpp AT delorie DOT com Subject: Re: Newbie help In-Reply-To: <345C1F21.723C@ix.netcom.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Hi. On Sat, 1 Nov 1997, Klywarre (THE AVATAR) wrote: > if(strcmp(argv[1], "\\c")) > when any character is used after the '\' character, the > message to enter a file name appears ---- not what it's supposed to > do!!! only when the option is '\c'. strcmp(s1, s2) returns *0* if s1 and s2 match. So the above test should be: if (strcmp(argv[1], "\\c") == 0) or, equivalently, if (!strcmp(argv[1], "\\c")) With the existing code, the message will appear for all arguments other than \c. May I add that main() should be: int main(int argc, char *argv[]) and that it should terminate with a return statement. Regards, Mahesh (Mahadevan R.),