|
|
 |
|
|
|
|
Counting in loops, 266, 268-269 |
|
|
|
 |
|
|
|
|
Counting votes case study, 728-740 |
|
|
|
 |
|
|
|
|
cout stream |
|
|
|
 |
|
|
|
|
accessing, 404 |
|
|
|
 |
|
|
|
|
using, 43, 68-70 |
|
|
|
 |
|
|
|
|
.cpp files |
|
|
|
 |
|
|
|
|
for class implementations, 854 |
|
|
|
 |
|
|
|
|
linking, 859 |
|
|
|
 |
|
|
|
|
CPU (central processing unit), 15-16 |
|
|
|
 |
|
|
|
|
Crashes from infinite recursion, 1124 |
|
|
|
 |
|
|
|
|
CrewMoment function (Starship), 441-442 |
|
|
|
 |
|
|
|
|
Ctrl/D keys, 264 |
|
|
|
 |
|
|
|
|
Ctrl/Z keys, 264 |
|
|
|
 |
|
|
|
|
ctype.h file, 413, 524, A3-A5 |
|
|
|
 |
|
|
|
|
Cubic time execution, 285-286 |
|
|
|
 |
|
|
|
|
Curly braces ({ }). |
|
|
|
 |
|
|
|
|
See Braces ({ }) |
|
|
|
 |
|
|
|
|
Cursor keys, 78 |
|
|
|
 |
|
|
|
|
Curves, area under, 551-558 |
|
|
|
 |
|
|
|
|
Dangling else problem, 211-212 |
|
|
|
 |
|
|
|
|
Dangling pointers, 984-986, 1031-1032 |
|
|
|
 |
|
|
|
|
Data, 8 |
|
|
|
 |
|
|
|
|
representation of. |
|
|
|
 |
|
|
|
|
See Representation |
|
|
|
 |
|
|
|
|
storing, 53 |
|
|
|
 |
|
|
|
|
testing, 239 |
|
|
|
 |
|
|
|
|
validation of, 234, 426-427, 433 |
|
|
|
 |
|
|
|
|
Data abstraction, 789, 920 |
|
|
|
 |
|
|
|
|
Data-dependent loops, 284-285 |
|
|
|
 |
|
|
|
|
Data flow, documenting, 356-358 |
|
|
|
 |
|
|
|
|
Data objects, 57 |
|
|
|
 |
|
|
|
|
Data types, 52 |
|
|
|
 |
|
|
|
|
abstract. |
|
|
|
 |
|
|
|
|
See Abstract data types (ADTs); |
|
|
|
 |
|
|
|
|
Classes |
|
|
|
 |
|
|
|
|
anonymous, 544-545, 780 |
|
|
|
 |
|
|
|
|
for array indices, 605-606 |
|
|
|
 |
|
|
|
|
built-in, 502-509 |
|
|
|
 |
|
|
|
|
char. |
|
|
|
 |
|
|
|
|
See char data type |
|
|
|
 |
|
|
|
|
choosing, 533 |
|
|
|
 |
|
|
|
|
in comparisons, 192 |
|
|
|
 |
|
|
|
|
converting, A8 |
|
|
|
 |
|
|
|
|
in declarations, 58 |
|
|
|
 |
|
|
|
|
defining, 189-190, 535 |
|
|
|
 |
|
|
|
|
demoting, 549-551 |
|
|
|
 |
|
|
|
|
floating point. |
|
|
|
 |
|
|
|
|
See Floating point data types |
|
|
|
 |
|
|
|
|
for function values, 408-410 |
|
|
|
 |
|
|
|
|
with input statements, 135, 175 |
|
|
|
 |
|
|
|
|
integral. |
|
|
|
 |
|
|
|
|
See Integral data types |
|
|
|
 |
|
|
|
|
named, 544-545 |
|
|
|
 |
|
|
|
|
in object binding, 926 |
|
|
|
 |
|
|
|
|
for parameters, 337, 344 |
|
|
|
 |
|
|
|
|
pointers. |
|
|
|
 |
|
|
|
|
See Pointers |
|
|
|
 |
|
|
|
|
promoting, 547-549 |
|
|
|
 |
|
|
|
|
reference, 987-990 |
|
|
|
 |
|
|
|
|
simple, 502-504 |
|
|
|
 |
|
|
|
|
size of, 515 |
|
|
|
 |
|
|
|
|
for structure (struct) members, 779 |
|
|
|
 |
|
|
|
|
structured. |
|
|
|
 |
|
|
|
|
See Arrays; Records |
|
|
|
 |
|
|
|
|
syntax templates for, A14-A15, A24 |
|
|
|
 |
|
|
|
|
testing and debugging, 576-577, 582 |
|
|
|
 |
|
|
|
|
type coercion and type casting with, 95-99, 509-510, 514 |
|
|
|
 |
|
|
|
|
user-defined, 534-535 |
|
|
|
 |
|
|
|
|
Date class |
|
|
|
 |
|
|
|
|
constructors for, 990-992, 994, 999 |
|
|
|
 |
|
|
|
|
declaring, 990-991, 993 |
|
|
|
 |
|
|
|
|
destructor for, 994-995 |
|
|
|
 |
|
|
|
|
specification file for, 993-994 |
|
|
|
 |
|
|
|
|
date.h file, 993-994 |
|
|
|
 |
|
|
|
|
Dates |
|
|
|
 |
|
|
|
|
in Birthday calls case study, 882-889 |
|
|
|
 |
|
|
|
|
classes for, 869-882, 990-995 |
|
|
|
 |
|
|
|
|
comparing, 871, 875 |
|
|
|
 |
|
|
|
|
incrementing, 871-872, 876 |
|
|
|
 |
|
|
|
|
printing, 871, 875 |
|
|
|
 |
|
|
|
|
DateType class, 869-870 |
|
|
|
 |
|
|
|
|
in Birthday calls case study, 882-889 |
|
|
|
 |
|
|
|
|
constructor for, 873, 878 |
|
|
|
 |
|
|
|
|
implementation file for, 873-882 |
|
|
|
 |
|
|
|
|
specification file for, 870-873 |
|
|
|
 |
|
|
|
|
testing, 874-877 |
|
|
|
 |
|
|
|
|
datatype.cpp file, 878-882 |
|
|
|
 |
|
|
|
|
datetype.h file, 872-873 |
|
|
|
 |
|
|
|
|
Day function (DateType class), 872, 879 |
|
|
|
 |
|
|
|
|
DaysInMonth function (DateType class), 881 |
|
|
|
 |
|
|
|
|
DBL_DIG constant, A5 |
|
|
|
 |
|
|
|
|
DBL_MAX constant, 508, A5 |
|
|
|
 |
|
|
|
|
DBL_MIN constant, 508, A5 |
|
|
|
 |
|
|
|
|
de Fermat, Pierre, 101 |
|
|
|
 |
|
|
|
|
Deallocating memory, 980-986, A25 |
|
|
|
 |
|
|
|
|
Debuggers, 312 |
|
|
|
 |
|
|
|
|
Debugging, 79-81, 84 |
|
|
|
 |
|
|
|
|
algorithm walk-through in, 230-234 |
|
|
|
 |
|
|
|
|
classes, 889-894 |
|
|
|
 |
|
|
|
|
comments for, 312-313, 808-809 |
|
|
|
 |
|
|
|
|
conditional expressions, 241-242 |
|
|
|
 |
|
|
|
|
data types, 576-577, 582 |
|
|
|
 |
|
|
|
|
expressions and function calls, 122 |
|
|
|
 |
|
|
|
|
functions, 369-374 |
|
|
|
 |
|
|
|
|
input, 173-176, 577-581 |
|
|
|
 |
|
|
|
|
linked lists, 1109-1111 |
|
|
|
 |
|
|
|
|
loops, 305-313, 492-494 |
|
|
|
 |
|
|
|
|
modular design in, 445-449 |
|
|
|
 |
|
|
|
|
multidimensional arrays, 757-759 |
|
|
|
 |
|
|
|
|
object-oriented programming, 956-958 |
|
|
|
 |
|
|
|
|
one-dimensional arrays, 635-637 |
|
|
|
 |
|
|
|
|
output, 173-176 |
|
|
|
 |
|
|
|
|
pointers, 1030-1033 |
|
|
|
 |
|
|
|
|
preconditions and postconditions in, 231-234 |
|
|
|
 |
|
|
|
|
programs, 6, 175 |
|
|
|
 |
|
|
|
|
records (structs), 821-824 |
|
|
|
 |
|
|
|
|
recursion, 1149 |
|
|
|
 |
|
|
|
|
searches, 698-699 |
|
|
|
 |
|
|
|
|
strings, 699-700 |
|
|
|
 |
|
|
|
|
Decimal numbers |
|
|
|
 |
|
|
|
|
constants, 505-507, A26 |
|
|
|
|
|