Practical Debugging in C++

Ann R. Ford, Toby J. Teorey

  • 出版商: Prentice Hall
  • 出版日期: 2002-01-15
  • 售價: $1,060
  • 貴賓價: 9.5$1,007
  • 語言: 英文
  • 頁數: 112
  • 裝訂: Paperback
  • ISBN: 0130653942
  • ISBN-13: 9780130653949
  • 相關分類: C++ 程式語言
  • 已絕版

買這商品的人也買了...

相關主題

商品描述

With this book, beginning programmers finally have a practical book on debugging techniques for C++. Practical Debugging in C++ serves as an important companion to any introductory textbook on C++ programming. Whether in the computer lab or at home, programmers should keep this book handy for quick reference when writing and debugging C++ programs.

The book includes chapters on:
  • common syntactic and semantic programming errors, with illustrative examples
  • tracing techniques using output statements (tout) in C++ programs, with examples illustrating how tracing can be easily inserted into your programs
  • application of tracing to more advanced C++ constructs such as strings, pointers, structs, and classes
  • use of the interactive debugger, with examples from Microsoft Visual C++ and Metrowerks CodeWarrior

Beginning programmers will want to use this book because it is easy and fast to read with many simple examples. It will save many frustrating hours of debugging time when the tracing and system debugger techniques illustrated in the text and figures are applied.

For the intermediate programmer, particularly those with some experience in other languages, this guide provides a quick up-to-speed primer in C++ debugging with a series of examples of common syntax and semantic errors and how they can be detected and corrected.

Instructors in introductory programming classes will want to recommend this book to their students because it will enable them to become much more self-sufficient, greatly reducing the time students will need for individual consultation regarding their programs.

Table of Contents

1. Introduction.

Chapter Objectives. Motivation for Debugging Skills. Approaches to Debugging.


2. Common Syntax and Semantic Errors.

Chapter Objectives. Syntax Errors. Syntax Warnings. Semantic Errors.


3. Tracing Techniques for Debugging.

Chapter Objectives. Basic Tracing. Common Errors Detectable with Basic Tracing. Trace On and Off Flag. Tracing Using Function Calls. Tracing for Data in Arrays. Where to Insert the Traces and What Variables to Display. Using the Assert Macro.


4. Trace Debugging for More Advanced C++ Constructs.

Chapter Objectives. Strings. Pointers. Structs. Classes.


5. Using an Interactive Debugger.

Chapter Objectives. Fundamentals. Debugging with Metrowerks CodeWarrior. Example: Debugging a Sample C++ Program Using Metrowerks CodeWarrior. Debugging with Microsoft® Visual C++™. Example: Debugging a Sample C++ Program Using Microsoft® Visual C++™.


Appendix A: The 32 Most Common Bugs in First Programs.
Appendix B: Checklist for Error Detection and Prevention.