Problems with c++ code in Nyhoff book

Discussion in 'Meet and Greet' started by BrentC_806, May 8, 2010.

Thread Status:
Not open for further replies.
  1. BrentC_806

    BrentC_806 New Member

    Joined:
    May 8, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Sirs,

    I have just completed a course in data structures taught in c++. The text used was by Larry Nyhoff, ADT's, Data Structures, and Problem Solving with C++, 2nd edition. The book is copywrighted (c)2005.

    Nyhoff has quite a bit of pre-written code in the book that is intended to be used verbatim for, say, constructing a binary dearch tree. However, one serious problem that I had thoughtout the course is that much of his code will not compile at all "as written". I am using MS Visual Studio 2008. I have no problem writing code of my own with this IDE, and have completed several other courses in c++ successfully with this IDE.

    The non-compiling code snippets are fairly lengthy, so I will be happy to email the code to anyone at their request rather than post 300 some-odd lines of code on the forum.

    My question is this: is it possible that Nyhoff was using some kind of outdated or non-iso compliant compiler when he wrote the book, or perhaps for a non-windows platform? Am I just an extremely bad typist in need of having my vision checked?

    Last time I checked, the ISO standards for c++ haven't really changed since 2003 (and the book is (c) 2005). Nevertheless, most of his code of 75 to 100 lines in c++ will produce anywhere from 15 to 30 compile-time errors using Visual Studio 2008, many of which seem to be typographical in nature, such as "syntax error: identifier ostream" anytime I try to type his code snippets. Is anyone out there familiar with this problem?

    I realize it is difficult to answer this question without actually seeing the code snippets themselves -- I will be happy to email some examples Nyhoff's non-compiling source code.

    Thank you to all for any time spend responding to this.

    Brent C
     
  2. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,342
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    http://www.crackingforfun.blogspot.com
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice