From: Ryan Blazecka Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie help Date: Sun, 02 Nov 1997 00:34:25 -0800 Organization: BCTEL Advanced Communications Lines: 18 Message-ID: <345C3B11.1ED4@bc.sympatico.ca> References: <345C1F21 DOT 723C AT ix DOT netcom DOT com> Reply-To: eblazecka AT bc DOT sympatico DOT ca NNTP-Posting-Host: srry01m01-30.bctel.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Klywarre (THE AVATAR) wrote: > if(strcmp(argv[1], "\\c")) [snip] > 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 returns 0 when the strings are equal. So when you compare the two strings, if they are the same, the result is 0, hence false, the if block is not executed, and the else is instead. I think what you meant was: if(strcmp(argv[1], "\\c") != 0) -- [ Ryan Blazecka -- http://www.deninc.com/~corrosion/ ] [ _corrosion_ AT geocities DOT com OR eblazecka AT bc DOT sympatico DOT ca ]