www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/17:27:06

From: frenchc AT cadvision DOT com (Calvin French)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: boo hoo. my code crashes.
Date: Mon, 17 Feb 1997 07:40:31 GMT
Organization: CADVision Development Corp.
Lines: 27
Message-ID: <5ea9or$n22@elmo.cadvision.com>
References: <5e5d6n$fda AT flex DOT uunet DOT pipex DOT com>
NNTP-Posting-Host: ts16ip70.cadvision.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

nikki AT gameboutique DOT co (nikki) wrote:

>struct node {
>        unsigned int frequency;
>        struct node *next;                    /* used to create an ordered list 
>        struct node *zero_child, *one_child;
>        unsigned short symbol;
>        char *code;                           /* a string of 0's and 1's */
>};

>int huffman_encode ()
>{
>        struct node *histogram[NUM_SYMBOL_VALUES];

Hmn... did you try just:

node* histogram[NUM_SYMBOL_VALUES];

I have always used this (probably more borland-ish) syntax, but if
it's functionally equivalent to the above then I totally agree with
you: I can't find anything wrong with this either... Unless there is
other code, which could be screwing things up, too :)

- Calvin -

www.cadvision.com/frenchc

- Raw text -


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