🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: csu.cs.200
Article #201

Re: #define MAX(), DNM and a working program?

#201
From: Jamison Deba
Date: Tue, 06 Oct 1998 00:00
63 lines
2797 bytes
--------------038EC89E25BC250F1B0FC93E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I don't know about the DNM, but the #define in Main4.C is an inline
function.  This is also used to define things like constants (ie. #define
MAX_SIZE 300).

I do have a working program, so I think you can rule out any error in the
Main4.C file.  What compiler are you trying?  I used CC not aCC.

Jamison Deba

Adam Carheden wrote:

> Does anyone know what the #define MAX() statement is all about in
> Main4.C (I'm just curious).  The book only lists define with respect to
> macro guarding.
>
> Also, does it matter if we use the DNM?
>
> Finally, does anyone have a correctly working program?  The sort
> function adds multiple nodes for the same name in my program and I'm
> stumped.  I just want to completely rule out an error in the Main4.C
> file, so if your program works, speak up!
>
> TIA
> --
> Adam
> carheden@holly.colostate.edu

--------------038EC89E25BC250F1B0FC93E
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
I don't know about the DNM, but the #define in Main4.C is an inline function.&nbsp;
This is also used to define things like constants (ie. <I>#define MAX_SIZE
300</I>).
<P>I do have a working program, so I think you can rule out any error in
the Main4.C file.&nbsp; What compiler are you trying?&nbsp; I used CC not
aCC.
<P>Jamison Deba
<P>Adam Carheden wrote:
<BLOCKQUOTE TYPE=CITE>Does anyone know what the #define MAX() statement
is all about in
<BR>Main4.C (I'm just curious).&nbsp; The book only lists define with respect
to
<BR>macro guarding.
<P>Also, does it matter if we use the DNM?
<P>Finally, does anyone have a correctly working program?&nbsp; The sort
<BR>function adds multiple nodes for the same name in my program and I'm
<BR>stumped.&nbsp; I just want to completely rule out an error in the Main4.C
<BR>file, so if your program works, speak up!
<P>TIA
<BR>--
<BR>Adam
<BR>carheden@holly.colostate.edu</BLOCKQUOTE>
</HTML>

--------------038EC89E25BC250F1B0FC93E--
Technical Details
Message-ID: <361A4741.41A9D1F0@summitview.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3619BA92.A76AECE5@holly.colostate.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 127144,b0bd8a3d32c829be
X-Google-Attributes: gid127144,public
From: Jamison Deba <deba@summitview.com>
Subject: Re: #define MAX(), DNM and a working program?
Date: 1998/10/06
Message-ID: <361A4741.41A9D1F0@summitview.com>
X-Deja-AN: 398316750
References: <3619BA92.A76AECE5@holly.colostate.edu>
To: Adam Carheden <carheden@holly.colostate.edu>
Content-Type: multipart/alternative; boundary="------------038EC89E25BC250F1B0FC93E"
Organization: Colorado State University, Fort Collins, CO  80523
Mime-Version: 1.0
Newsgroups: csu.cs.200