高等 C 語言相關書籍

高等 C 語言

簡介

字串

指標與陣列

函數

結構

物件導向

記憶體

檔案

錯誤處理

巨集處理

C 與組合語言

資料結構

動態字串

動態陣列

鏈結串列

雜湊表

開發環境

Make

Cygwin

MinGW

DevC++

wxDevC++

編譯器

gcc 編譯器

TinyCC 編譯器

LCC 編譯器

應用主題

CGI 程式

GNU 程式

視窗程式

影像處理

練習題

訊息

相關網站

參考文獻

最新修改

簡體版

English

  1. Object-Oriented Programming With ANSI-C (pdf) — http://www.planetpdf.com/codecuts/pdfs/ooc.pdf
    • 註:這本書超棒的,以下是其目錄內容,內行的人一看就知道了,精采絕論。
Preface ........................... 5
1 Abstract Data Types — Information Hiding ........... 1
1.1 Data Types ...................... 1
1.2 Abstract Data Types .................. 1
1.3 An Example — Set ................... 2
1.4 Memory Management ................. 3
1.5 Object ....................... 3
1.6 An Application .................... 4
1.7 An Implementation — Set ................ 4
1.8 Another Implementation — Bag .............. 7
1.9 Summary ...................... 9
1.10 Exercises ...................... 9
2 Dynamic Linkage — Generic Functions ............. 11
2.1 Constructors and Destructors .............. 11
2.2 Methods, Messages, Classes and Objects ......... 12
2.3 Selectors, Dynamic Linkage, and Polymorphisms ....... 13
2.4 An Application .................... 16
2.5 An Implementation — String ............... 17
2.6 Another Implementation — Atom ............. 18
2.7 Summary ...................... 20
2.8 Exercises ...................... 20
3 Programming Savvy — Arithmetic Expressions ......... 21
3.1 The Main Loop .................... 21
3.2 The Scanner ..................... 22
3.3 The Recognizer .................... 23
3.4 The Processor .................... 23
3.5 Information Hiding ................... 24
3.6 Dynamic Linkage ................... 25
3.7 A Postfix Writer .................... 26
3.8 Arithmetic ...................... 28
3.9 Infix Output ..................... 28
3.10 Summary ...................... 29
4 Inheritance — Code Reuse and Refinement ........... 31
4.1 A Superclass — Point .................. 31
4.2 Superclass Implementation — Point ............ 32
4.3 Inheritance — Circle .................. 33
4.4 Linkage and Inheritance ................. 35
4.5 Static and Dynamic Linkage ............... 36
4.6 Visibility and Access Functions .............. 37
4.7 Subclass Implementation — Circle ............. 39viii _ __________________________________________________________________________ Contents
4.8 Summary ...................... 40
4.9 Is It or Has It? — Inheritance vs. Aggregates ........ 42
4.10 Multiple Inheritance .................. 42
4.11 Exercises ...................... 43
5 Programming Savvy — Symbol Table ............. 45
5.1 Scanning Identifiers .................. 45
5.2 Using Variables .................... 45
5.3 The Screener — Name ................. 47
5.4 Superclass Implementation — Name ............ 48
5.5 Subclass Implementation — Var .............. 50
5.6 Assignment ..................... 51
5.7 Another Subclass — Constants .............. 52
5.8 Mathematical Functions — Math ............. 52
5.9 Summary ...................... 55
5.10 Exercises ...................... 55
6 Class Hierarchy — Maintainability ............... 57
6.1 Requirements ..................... 57
6.2 Metaclasses ..................... 58
6.3 Roots — Object and Class ................ 59
6.4 Subclassing — Any .................. 60
6.5 Implementation — Object ................ 62
6.6 Implementation — Class ................ 63
6.7 Initialization ..................... 65
6.8 Selectors ...................... 65
6.9 Superclass Selectors .................. 66
6.10 A New Metaclass — PointClass .............. 68
6.11 Summary ...................... 70
7 The ooc Preprocessor — Enforcing a Coding Standard ...... 73
7.1 Point Revisited .................... 73
7.2 Design ....................... 78
7.3 Preprocessing .................... 79
7.4 Implementation Strategy ................ 80
7.5 Object Revisited .................... 82
7.6 Discussion ...................... 84
7.7 An Example — List, Queue, and Stack ........... 85
7.8 Exercises ...................... 89
8 Dynamic Type Checking — Defensive Programming ....... 91
8.1 Technique ...................... 91
8.2 An Example — list ................... 92
8.3 Implementation .................... 94
8.4 Coding Standard .................... 94
8.5 Avoiding Recursion .................. 98
8.6 Summary ...................... 100
8.7 Exercises ...................... 101ix _ __________________________________________________________________________ Contents
9 Static Construction— Self-Organization ............ 103
9.1 Initialization ..................... 103
9.2 Initializer Lists — munch ................ 104
9.3 Functions for Objects .................. 106
9.4 Implementation .................... 107
9.5 Summary ...................... 109
9.6 Exercises ...................... 110
10 Delegates — Callback Functions ............... 111
10.1 Callbacks ...................... 111
10.2 Abstract Base Classes ................. 111
10.3 Delegates ...................... 113
10.4 An Application Framework — Filter ............ 114
10.5 The respondsTo Method ................ 117
10.6 Implementation .................... 119
10.7 Another application — sort ................ 122
10.8 Summary ...................... 123
10.9 Exercises ...................... 124
11 Class Methods— Plugging Memory Leaks ........... 125
11.1 An Example ..................... 125
11.2 Class Methods .................... 127
11.3 Implementing Class Methods .............. 128
11.4 Programming Savvy — A Classy Calculator ......... 131
11.5 Summary ...................... 140
11.6 Exercises ...................... 141
12 Persistent Objects — Storing and Loading Data Structures .... 143
12.1 An Example ..................... 143
12.2 Storing Objects — puto() ................ 148
12.3 Filling Objects — geto() ................. 150
12.4 Loading Objects — retrieve() ............... 151
12.5 Attaching Objects — value Revisited ............ 153
12.6 Summary ...................... 156
12.7 Exercises ...................... 157
13 Exceptions — Disciplined Error Recovery ............ 159
13.1 Strategy ....................... 159
13.2 Implementation — Exception ............... 161
13.3 Examples ...................... 163
13.4 Summary ...................... 165
13.5 Exercises ...................... 166
14 Forwarding Messages — A GUI Calculator ........... 167
14.1 The Idea ....................... 167
14.2 Implementation .................... 168
14.3 Object-Oriented Design by Example ............ 171
14.4 Implementation — Ic .................. 174x _ __________________________________________________________________________ Contents
14.5 A Character-Based Interface — curses ........... 179
14.6 A Graphical Interface — Xt ................ 182
14.7 Summary ...................... 188
14.8 Exercises ...................... 189
A ANSI-C Programming Hints ................. 191
A.1 Names and Scope ................... 191
A.2 Functions ...................... 191
A.3 Generic Pointers — void * ................ 192
A.4 const ........................ 193
A.5 typedef and const ................... 194
A.6 Structures ...................... 194
A.7 Pointers to Functions .................. 195
A.8 Preprocessor ..................... 196
A.9 Verification — assert.h ................. 196
A.10 Global Jumps — setjmp.h ................ 196
A.11 Variable Argument Lists — stdarg.h ............ 197
A.12 Data Types — stddef.h ................. 198
A.13 Memory Management — stdlib.h ............. 198
A.14 Memory Functions — string.h .............. 198
B The ooc Preprocessor — Hints on awk Programming ....... 199
B.1 Architecture ..................... 199
B.2 File Management — io.awk ............... 200
B.3 Recognition — parse.awk ................ 200
B.4 The Database ..................... 201
B.5 Report Generation — report.awk ............. 202
B.6 Line Numbering .................... 203
B.7 The Main Program — main.awk .............. 204
B.8 Report Files ..................... 204
B.9 The ooc Command ................... 205
C Manual .......................... 207
C.1 Commands ...................... 207
C.2 Functions ...................... 214
C.3 Root Classes ..................... 214
C.4 GUI Calculator Classes ................. 218
Bibliography ......................... 223

Facebook

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License