From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: help with code Date: Thu, 05 Dec 1996 21:56:12 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 21 Message-ID: <32A7B57C.4DFB@cs.com> References: <32a76c78 DOT 11390127 AT news DOT primenet DOT com> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp105.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Mike McLean DJ-Gateway: from newsgroup comp.os.msdos.djgpp Mike McLean wrote: > > I am having trouble with the following code from a program I am > working on. I know this may be basic, but the C programming book I am > using doesn't help with it at all > > if (" %s",lgname = "New") Huh?? What you need to read up on is the syntax of "if" statements... I think you mean this: if ( strcmp( lgname, "New" ) == 0 ) printf("welcome"); -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Plan: To find ANYONE willing to | http://www.cs.com/fighteer | | play Descent 2 on DWANGO! | Tagline: | ---------------------------------------------------------------------