Bibliographic record and links to related information available from the Library of Congress catalog.

Note: Contents data are machine generated based on pre-publication provided by the publisher. Contents may have variations from the printed book or be incomplete or contain other coding.

```Table of Contents
Chapter 1 - Introduction to Computers and Programming	1
1.1 Overview of computers and programming	1
1.2 Historical developments	2
1.3 Computer hardware	4
1.3.1 Input and Output (I/O) devices	4
1.3.2 Random Access Memory (RAM)	4
1.3.3 Central Processing Unit (CPU)	4
1.3.4 Storage devices	5
1.3.5 Motherboard	7
1.4 Computer software	7
1.4.1 Application software	8
1.4.2 System software	8
1.5 Embedded systems	9
1.7 Programming languages	10
1.7.1 The C programming language	11
1.7.2 The C++ programming language	12
1.8 Data hierarchy	13
1.9 Numbering systems	14
1.9.1 Counting	14
1.9.2 Converting from a base to base 10	15
1.9.3 Converting from base 10 to a different base	16
1.10 Summary	17
1.11 Answers to Chapter Exercises	18
Chapter 2 - Program Design and Development	19
2.1 Procedural programming	19
2.2 Problem Solving Overview	20
2.2.1 Development process	21
2.3 Algorithm representation	25
2.3.1 Flowchart	26
2.3.2 Pseudocode	27
2.4 Algorithm development	30
2.4.1 Value of algorithm development	30
2.4.2 Step-wise refinement	30
2.5 Compilation process	30
2.5.1 Editor	31
2.5.2 Preprocessor	32
2.5.3 Language translator	32
2.6 Program development in Microsoft Visual Studio	34
2.6.1 Using an Integrated Development Environment (IDE)	34
2.7 Running the program	35
2.8 Errors	35
2.8.1 Syntax error	35
2.8.3 Run-time error	36
2.8.4 Logic error	37
2.9 Desk-checking	37
2.10 Using Visual Studio(VS)	38
2.10.1 Getting started	38
2.11 Debugging	43
2.12 Problem Solving Applied	43
2.13 Summary	44
2.14 Debugging Exercises	45
2.15 Programming Exercises	46
2.16 Team Programming Exercise	46
2.17 Answers to Chapter Exercises	47
Chapter 3 ¿ Getting Started with C++	50
3.1 C++ basics	50
3.2 Whitespace	51
3.4 The main function	52
3.5 The #include preprocessor directive	54
3.5.1 Namespaces	55
3.6 Problem Solving Applied	57
3.7 C ¿ The Differences	58
3.8 Summary	59
3.9 Debugging Exercises	60
3.10 Programming Exercises	60
3.11 Team Programming Exercise	61
3.12 Answers to Chapter Exercises	62
Chapter 4 - Literals, Variables and Constants	64
4.1 Literals	64
4.2 Character Escape sequences	65
4.3 Variable declarations	67
4.3.1 Variable¿s initial value	68
4.3.2 Initialization	69
4.3.3 Data types	70
4.3.4 The sizeof operator	71
4.3.5 Numeric literal suffixes	72
4.3.6 Naming rules	73
4.4 ASCII characters	74
4.5 Constants	75
4.6 const versus #define	76
4.7 Bringing it all together	78
4.8 Variable declarations in pseudocode	79
4.9 Problem Solving Applied	79
4.10 C ¿ The Differences	81
4.11 Summary	82
4.12 Debugging Exercises	83
4.13 Programming Exercises	84
4.14 Team Programming Exercise	84
4.15 Answers to Chapter Exercises	85
Chapter 5 - Input and Output Streams	88
5.1 Input and Output Streams	88
5.1.1 Namespaces and I/O Streams	88
5.1.2 The cout statement	89
5.1.3 The cin statement	90
5.2 The endl manipulator	92
5.2.1 The endl manipulator versus '\n'	93
5.3 Input and output buffers	94
5.4 Formatting the output stream	94
5.4.1 The .width member function and setw manipulator	95
5.4.2 The .precision member function and setprecision manipulator	97
5.4.3 The .setf member function	97
5.4.4 The .flush member function and the flush manipulator	98
5.5 Debugging	100
5.5.1 Step into, step over, and step out	100
5.5.2 Run to cursor	101
5.5.3 Breakpoints	101
5.5.4 Watches	102
5.5.5 Importance of debugging	103
5.6 Problem Solving Applied	103
5.7 C ¿ The Differences	105
5.7.1 The printf function	106
5.7.2 Formatting the printf statement	107
5.7.3 Flushing the output buffer	108
5.7.4 The scanf function	108
5.7.5 The getch function	109
5.8 Summary	110
5.9 Debugging Exercise	111
5.10 Programming Assignments	113
5.11 Team Programming Assignments	114
5.12 Answers to Chapter Exercises	116
Chapter 6 - Mathematical Operations	118
6.1 Mathematical expressions	118
6.2 Assignment operator ( = )	120
6.3 Standard arithmetic operators ( +, -, *, /, % )	120
6.4 Increment and decrement operators ( ++, -- )	122
6.5 Compound assignment operators ( +=, ¿=, *=, /=, %= )	123
6.6 Accumulators versus counters	124
6.7 Order of precedence	125
6.8 Mathematical functions	126
6.8.1 The pow function	126
6.8.2 The sqrt function	127
6.8.3 The abs function	128
6.9 Type casting	129
6.10 Problem Solving Applied	131
6.11 C ¿ The Differences	132
6.12 Summary	133
6.13 Debugging Exercise	133
6.14 Programming Exercises	134
6.15 Team Programming Exercise	136
6.16 Answers to Chapter Exercises	137
Chapter 7 - Conditional Statements	140
7.1 Conditional expressions	140
7.1.1 Relational operators	140
7.1.2 Logical operators	142
7.2 The if statement	144
7.2.1 The else statement	145
7.3 Variable scope	150
7.4 The switch statement	152
7.5 Conditional operator	157
7.6 Problem Solving Applied	158
7.7 C ¿ The Differences	160
7.8 Summary	160
7.9 Debugging Exercise	160
7.10 Programming Exercises	162
7.11 Team Programming Exercise	163
7.12 Answers to Chapter Exercises	164
Chapter 8 - Repetition Statements	167
8.1 General repetition concepts	167
8.2 The while loop	169
8.3 The do-while loop	171
8.4 The for loop	173
8.4.1 Nested for loops	177
8.5 Breakpoints and loops	179
8.6 Problem Solving Applied	181
8.7 C ¿ The Differences	183
8.8 Summary	184
8.9 Debugging Exercise	184
8.10 Programming Exercises	186
8.11 Team Programming Exercise	187
8.12 Answers to Chapter Exercises	188
Chapter 9 - Functions	191
9.1 What are functions?	191
9.2 Function components	194
9.2.1 Function declaration	194
9.2.2 Function definition	195
9.2.3 Function call	196
9.3 Return	198
9.4 Passing parameters	201
9.4.1 Formal and actual parameters	202
9.4.2 Scope	202
9.4.3 Passing by value	203
9.4.4 Passing by reference	204
9.5 Default arguments	207
9.6 Putting it all together	209
9.7 Debugging - Call stack	210
9.8 More predefined functions	210
9.8.1 Character case	211
9.8.2 The ¿is¿ functions	212
9.9 Structure charts	213
9.10 Problem Solving Applied	214
9.11 C ¿ The Differences	217
9.12 Summary	217
9.13 Debugging Exercises	218
9.14 Programming Exercises	220
9.15 Team Programming Exercise	221
9.16 Answers to Chapter Exercises	223
Chapter 10 - Arrays and cStrings	226
10. 1 What are arrays?	226
10.2 Declaring arrays	227
10.3 Using arrays	230
10.4 Initialization	234
10.5 Array manipulation	236
10.6 Passing arrays to functions	237
10.7 Special case: cStrings	242
10.7.1 cString initialization	243
10.7.2 I/O with cStrings	244
10.7.3 cStrings and the ¿address of¿ operator	247
10.8 cString functions	250
10.8.1 Copying	251
10.8.2 Appending	251
10.8.3 Comparing	252
10.8.4 Finding the length	255
10.8.5 Changing the case	256
10.8.6 Reversing	257
10.8.7 Converting cStrings to numbers	257
10.8.8 Converting numbers to cStrings	258
10.8.9 Summary of cString functions	259
10.9 cString function standards	261
10.10 Multi-dimensional arrays	262
10.10.1 Declaration	265
10.10.2 Initialization	265
10.10.3 Multi-dimensional array I/O	266
10.10.4 Passing multi-dimensional arrays	268
10.11 Parallel arrays	270
10.12 Problem Solving Applied	272
10.13 C ¿ The Differences	275
10.14 Summary	277
10.15 Debugging Exercises	278
10.16 Programming Exercises	280
10.17 Team Programming Exercise	283
10.18 Answers to Chapter Exercises	288
Chapter 11 - File I/O and Data Manipulation	293
11.1 Data files	293
11.2 File streams	295
11.3 Opening files	297
11.4 Checking for successful opening	299
11.5 Closing files	301
11.6 Writing to files	301
11.8 Searching	306
11.9 Sorting	309
11.10 Problem Solving Applied	312
11.11 C ¿ The Differences	315
11.11.1 File pointer	315
11.11.2 Opening files	316
11.11.3 Checking for a successful open	316
11.11.4 Closing files	317
11.11.5 Writing to a file	318
11.11.6 Reading from a file	318
11.12 Summary	319
11.13 Debugging Exercises	320
11.14 Programming Exercises	323
11.15 Team Programming Exercise	324
11.16 Answers to Chapter Exercises	327

Chapter 12 - Pointers and Dynamic Memory Allocation	330
12.1 Definition	330
12.2 Declaration	331
12.4 Indirection operator	336
12.5 Passing by pointer	339
12.6 Pointer arithmetic	342
12.7 Pointers applied	346
12.8 More cString functions	348
12.8.1 The strtok function	348
12.8.2 The strstr function	349
12.8.3 The strchr function	350
12.8.4 The memset function	351
12.9 Dynamic memory allocation	352
12.9.1 The new operator	353
12.9.2 The delete operator	354
12.10 Passing pointers by reference	356
12.11 Pointers and strings	359
12.12 Ragged arrays	359
12.13 Dynamic two dimensional arrays	362
12.14 Testing for memory leaks	366
12.15 Function pointers	367
12.15.1 Declaration	367
12.15.2 Retrieving a function¿s address	368
12.15.3 Indirectly calling a function	369
12.15.4 Uses of function pointers	370
12.16 Problem Solving Applied	372
12.17 C ¿ The Differences	377
12.17.1 Dynamic memory allocation	377
12.17.2 Dynamic memory deallocation	378
12.17.3 Memory leak detection	379
12.18 Summary	379
12.19 Debugging Exercises	380
12.20 Programming Exercises	382
12.21 Team Programming Exercise	384
12.22 Answers to Chapter Exercises	385
Chapter 13 - User Defined Types	391
13.1 The typedef statement	391
13.2 Enumerated data types	392
13.3 Structures	396
13.3.1 Nested structures	397
13.3.2 Structure variables	398
13.3.3 Accessing the data members	399
13.3.4 Structure variable manipulation	400
13.3.5 Shallow copy versus deep copy	400
13.4 Unions	405
13.5 Problem Solving Applied	408
13.6 C ¿ The Differences	409
Chapter 14 - Introduction to Object-Oriented Programming	418
14.1 History of object-oriented programming	419
14.2 Key concepts of object-oriented programming	419
14.2.1 Encapsulation	419
14.2.2 Interface versus implementation	420
14.2.3 Inheritance	421
14.2.4 Polymorphism	422
14.3.1 Models real life	423
14.3.2 Self-contained	424
14.3.3 Code reuse	424
14.4 String class	425
14.4.1 Instantiation and initialization	425
14.4.2 Reading and writing strings	426
14.4.3 Other string features	426
14.5 UML introduction	428
14.5.1 UML overview	428
14.5.2 Class Diagram	428
14.6 Problem Solving Applied	429
14.7 C ¿ The Differences	431
14.8 Summary	432
14.9 Answers to Chapter Exercises	433
Chapter 15 - Introduction to Classes	435
15.1 Classes	435
15.1.1 Definition syntax	435
15.1.2 Access specifiers	436
15.1.3 Data members	437
15.1.4 Member function	437
15.1.5 Setters and getters	439
15.2 Instantiation	441
15.3 Manager functions	443
15.3.1 Constructor	443
15.3.2 Destructor	445
15.4 Implementation hiding	446
15.5 Conditional compilation	448
15.5.1 #ifndef	449
15.5.2 #pragma once	450
15.6 Base member initialization	451
15.7.1 Name mangling	454
15.8 Passing by const-ref	454
15.8.1 Const methods	455
15.9 Problem Solving Applied	455
15.10 C ¿ The Differences	457
15.11 Summary	457
15.12 Debugging Exercises	458
15.13 Programming Exercises	461
15.14 Team Programming Exercise	463
15.15 Answers to Chapter Exercises	464
Chapter 16 - Miscellaneous Topics	467
16.1 Storage classes	467
16.1.1 Static	468
16.1.2 Extern	470
16.2 Command line arguments	472
16.3 Conditional compilation	474
16.4 Macros	477
16.5 Bitwise operations	480
16.5.1 Bitwise operators	480
16.5.2 Bit fields	481
16.6 Recursion	487
16.7 Summary	491
16.8 Programming Exercises	492
16.9 Answers to Chapter Exercises	493
Chapter 17 - Binary and Random Access Files	495
17.1 Text files versus binary files	495
17.2 Opening and closing binary files	496
17.3 Binary file I/O	498
17.4 Sequential files versus random access files	501
17.4.1 Determining current FPM location	502
17.4.2 Moving the FPM	503
17.5 C ¿ The Differences	505
17.5.1 File modes	505
17.5.2 Binary file I/O with C	506
17.5.3 Random access functions	508
17.6 Summary	509
17.7 Programming Exercises	510
17.8 Answers to Chapter Exercises	510
Chapter 18 - Introduction to Linked Lists	512
18.1 Data structures	512
18.2.1 List implementation options	514
18.2.2 Node structure	514
18.2.4 Creating a new node	516
18.3 Prepending a node	518
18.4 Appending a node	520
18.5 Inserting a node into an ordered list	522
18.6 Traversing the list	525
18.7 Deleting nodes	528
18.7.1 Deleting all nodes	528
18.7.2 Deleting a specific node from an ordered list	530
18.8 Arrays versus linked lists	533
18.9 Problem Solving Applied	533
18.10 C ¿ The Differences	535
18.11 Summary	535
18.12 Debugging Exercises	536
18.13 Programming Exercises	539
18.14 Team Programming Exercise	540
18.15 Answers to Chapter Exercises	541
```

Library of Congress Subject Headings for this publication:

C++ (Computer program language).