memory error

This is a discussion on memory error within the C++ Programming forums, part of the General Programming Boards category; Wow....

  1. #16
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Wow.
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  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
    23,796
    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.

Page 2 of 2 FirstFirst 12
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, 04: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21