Thread: memory error

  1. #16
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Wow.
    Mainframe assembler programmer by trade. C coder when I can.

  2. #17
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Quote Originally Posted by bjarne View Post
    (1) That code is not copied exactly: system("pause"); is never used in PPP
    (2) The main() for that example has a try block
    (3) You can find all the code for the book at Stroustrup: Programming -- Principles and Practice Using C++
    Hi,

    Thanks for the response,and in answer:

    1. I know this is not used in the book, however I prefer it to keep_window_open(), and this would not affect the output
    2. The code in the book does not have a try block. (page 178)
    3. Thanks for the link, I will take a look later.

  3. #18
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by darren78
    2. The code in the book does not have a try block. (page 178)
    Maybe the website has the corrected code.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #19
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Quote Originally Posted by darren78 View Post
    Hi,

    Thanks for the response,and in answer:

    1. I know this is not used in the book, however I prefer it to keep_window_open(), and this would not affect the output
    2. The code in the book does not have a try block. (page 178)
    3. Thanks for the link, I will take a look later.
    Hi Bjarne

    I have downloaded the code, and that works perfectly. Thank you. It is however different to the book I have. Were their different versions released?

    And on a good note, it is by far the best beginners book I have used. Very clear with good examples and lots of excercises to practise with!! Much prefer it to APP.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM