Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!jarthur!elroy.jpl.nasa.gov!ncar!ico!attc!rogopp From: rogopp@attc.UUCP (Roger Opperman) Newsgroups: comp.lang.c Subject: Re: errors in Alg in "C" by Sedgewick Message-ID: <988@attc.UUCP> Date: 21 Jan 91 20:53:39 GMT References: Reply-To: rogopp@auto-trol.UUCP (Roger Opperman) Distribution: comp Organization: Auto-trol Technology, Denver Lines: 15 In article davidd@wolf.cs.washington.edu (David Doll) writes: >Hello, I just got a copy of Algorithms in C by R. Sedgewick. I'm working with >graph stuff and I typed in the alg on page 421 and my compiler (Ultrix 4.1 on >a nDS5000) puked on almost everything I typed in...I doubled checked my typing >so I'm guessing that he's wrong - has anybody else had problems with this >book? Is there any place else that would have correct(?) code? Thanks. > >-- How well do you know C? The text clearly states that the provided code is only a fragment: "The types of v1 and v2 are omitted from this program, as well as the code for index. These can be added in a straightforward manner, depending on the graph input representation desired." (p. 420). It would be a little much to expect the code to compile as "typed in" without a main and with no definition for v1, v2 and index.