Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: errors in Alg in "C" by Sedgewick Message-ID: <14928@smoke.brl.mil> Date: 22 Jan 91 02:48:34 GMT References: Distribution: comp Organization: U.S. Army Ballistic Research Laboratory (BRL), APG, MD. Lines: 12 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 DS5000) 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. Well, there are some problems with typing in JUST the supplied code, as it does not include declarations for malloc() or scanf(). Also, on p. 420 Sedgewick notes that v1, v2, and index() are omitted since they depend on the graph representation. Thus, you should use the given code as a guide to writing your own, not just copy it blindly.