C
C++, how program works, 120
anatomy of C++ program, 37
computer program defined, 2
IDE and Hello World project, 919
programming language defined, 23
translating code for computers, 79
C++ program, anatomy of, 37
#include directive, 67
cout, 56
function body, 5
main function, 5
namespaces, 7
return 0 statement, 6
C++ string class function, 243
C++ string functions, C-string and, 259266
Calling functions, 164165
defining and, 162166
Case conversion functions, 256257
Change machine project, 7780
algorithms, 7980
code, 7879
program description, 78
Character arrays, initializing, 196198
Character functions, 243, 256258
case conversion functions, 256257
functions that check values of characters , 258
Character values, storage of, 3536
Characters, functions that check values of, 258
Characters, reading, 244255
cin.get function, 245248
cin.ignore function, 248252
combining use of cin, cin.get, and cin.getline, 252255
press any key to continue problem, 245252
rules to live by, 255
Cin and cout objects with arrays, 202205
Cin objects, 5662
assigning compatible data type, 6061
assigning compatible data types, 5758
getline function, 205208
inputting multiple words into strings, 61
inputting values for multiple variables , 5860
and numeric arrays, 204205
overflow and underflow, 62
Cin.ignore function, 248252
Classes, structures and, 293316
classes, 309314
object-oriented programming (OOP), 294295
reasons for reading book, 294
structures, 296309
Code
and output, 40
running, 19
writing source, 1317
Code, translating for computers, 79
compilers, 8
linkers, 89
preprocessors, 8
Common syntax errors, 100
Comparing
addresses, 225226
two strings, 262264
Compatible data type, assigning, 6061
Compatible data types, assigning, 5354, 5758
Computer program defined, 2
Computers, translating code for, 79
compilers, 8
linkers, 89
preprocessors, 8
Computers doing math, letting, 6581
Conditional operators, 9495
Conditional statements, curly braces and multiple, 9293
Constant pointers, array names as, 221222
Constants, 189192
assigning pointers the addresses of variables and, 218219
Constants, pointers as variables or, 220222
array names as constant pointers, 221222
pointers as variables, 221
Constructor prototypes , separating, 304305
Constructors, 300305
with arguments, 302304
default, 300301
fstream or ofstream , 275276
no-argument , 301302
separating constructor prototypes, 304305
Continue keyword, 138139, 152153
Conversion between C-strings and numbers , 264266
Conversion functions, case, 256257
Cout, 56
objects and numeric arrays, 203204
Creating Hello World project, 919
C-string and C++ string functions, 259266
appending strings, 261
assigning values to strings, 260261
comparing two strings, 262264
conversion between C-strings and numbers, 264266
determining lengths of strings, 259260
C-strings and numbers, conversion between, 264266
Curly braces, and multiple conditional statements, 9293
Cycle, file access life, 272