www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/05/22:22:17

From: "John M. Aldrich" <fighteer AT cs DOT com>
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
To: Mike McLean <libolt AT primenet DOT com>
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: <this space for rent> |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019