1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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

    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δЭ ~

  3. shabbir

    shabbir Administrator Staff Member

Thread Status:
Not open for further replies.

Share This Page