Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!nih-csl!sparkler.dcrt.nih.gov!kgorlen From: kgorlen@sparkler.dcrt.nih.gov (Keith Gorlen) Newsgroups: comp.lang.c++ Subject: Re: Typo in book by Keith Gorlen, et. al. ? Message-ID: <553@nih-csl.nih.gov> Date: 12 Oct 90 16:23:29 GMT References: <1990Oct11.175238.24917@tandem.com> Sender: news@nih-csl.nih.gov Reply-To: kgorlen@sparkler.dcrt.nih.gov (Keith Gorlen) Lines: 29 In article <1990Oct11.175238.24917@tandem.com>, chetan@wizard.DSG.Tandem.COM (Chetan Saiya) writes: |> |>Hi: |>On page 146 (chpt. 8: Programming with the NIH Container Classes) of the book |>Data Abstraction And Object Oriented Programming in C++, an example is given |>for the "isKindOf()" function as follows : |> |>Point p(0,1); |>if (p.isKindOf(*Point::desc())) .... YES |>if (p.isKindOf(*Object::desc())) .... NO |>... |> |>Shouldn't the last line say YES (or return TRUE), since Point is derived |>from Object ? |> |>Thanks, |>Chetan You are correct, the comment is wrong. It should read: if (p.isKindOf(*Object::desc())) ... // YES Thanks for pointing this out. Keith Gorlen phone: (301) 496-1111 Building 12A, Room 2033 uucp: uunet!nih-csl!kgorlen National Institutes of Health Internet: kgorlen@alw.nih.gov Bethesda, MD 20892