Practical Debugging in C++
暫譯: C++ 實用除錯技巧

Ann R. Ford, Toby J. Teorey

  • 出版商: Prentice Hall
  • 出版日期: 2002-01-15
  • 售價: $1,070
  • 貴賓價: 9.5$1,017
  • 語言: 英文
  • 頁數: 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.

商品描述(中文翻譯)

這本書為初學程式設計的程式員提供了一本實用的 C++ 除錯技術書籍。《Practical Debugging in C++》是任何 C++ 程式設計入門教科書的重要伴侶。無論是在電腦實驗室還是在家中,程式員都應隨時攜帶這本書,以便在撰寫和除錯 C++ 程式時快速參考。

本書包括以下章節:
- 常見的語法和語意程式錯誤,並附有示例
- 使用輸出語句 (tout) 的追蹤技術,並示範如何輕鬆地將追蹤插入到您的程式中
- 將追蹤應用於更高級的 C++ 結構,如字串、指標、結構和類別
- 使用互動式除錯器,並提供來自 Microsoft Visual C++ 和 Metrowerks CodeWarrior 的示例

初學程式設計的程式員會想使用這本書,因為它易讀且快速,並且有許多簡單的示例。當應用書中和圖示中的追蹤及系統除錯技術時,將節省許多令人沮喪的除錯時間。

對於中級程式員,特別是那些在其他語言上有一些經驗的人,這本指南提供了一個快速的 C++ 除錯入門,包含一系列常見語法和語意錯誤的示例,以及如何檢測和修正這些錯誤。

初級程式設計課程的講師會希望向學生推薦這本書,因為它將使學生變得更加自給自足,大大減少學生在個別諮詢其程式時所需的時間。

目錄
1. 介紹。
章節目標。除錯技能的動機。除錯方法。

2. 常見的語法和語意錯誤。
章節目標。語法錯誤。語法警告。語意錯誤。

3. 用於除錯的追蹤技術。
章節目標。基本追蹤。可用基本追蹤檢測的常見錯誤。追蹤開啟和關閉標誌。使用函數調用進行追蹤。追蹤數組中的數據。插入追蹤的位置和顯示的變數。使用 Assert 宏。

4. 更高級 C++ 結構的追蹤除錯。
章節目標。字串。指標。結構。類別。

5. 使用互動式除錯器。
章節目標。基本原理。使用 Metrowerks CodeWarrior 進行除錯。示例:使用 Metrowerks CodeWarrior 除錯示例 C++ 程式。使用 Microsoft® Visual C++™ 進行除錯。示例:使用 Microsoft® Visual C++™ 除錯示例 C++ 程式。

附錄 A:第一個程式中最常見的 32 種錯誤。
附錄 B:錯誤檢測和預防檢查表。