C++ Demystified(c) A Self-Teaching Guide

F

Factorial example, 135

File access life cycle, 272

File input and output, 269291

closing files, 280

file access life cycle, 272

file stream objects as function arguments, 287289

fstream standard library, 271272

opening files, 272279

reading from files, 282287

text vs. binary files, 270271

writing to files, 280282

File modes, 274275

File stream objects as function arguments, 287289

Files

closing, 280

looping through, 285287

opening for reading, 276277

opening for reading and writing, 277

source, 3740

text vs. binary, 270271

writing to, 280282

Files, opening, 272279

checking if file was opened, 278279

opening files for reading, 276277

opening files for reading and writing, 277

opening files for writing, 272276

Files, opening for writing, 272276

checking if they were opened, 278279

fstream or ofstream constructor, 275276

open member function, 273275

Files, reading from, 282287

looping through files, 285287

reading lines of files, 283285

Files, reading lines of, 283285

Flags, 148151

Floating-point data types, 3235

scientific and E notations, 34

storage of floating-point numbers , 3435

Floating-point numbers, storage of, 3435

Flowcharting, 8789

For and while loops , comparison of, 146147

For loops, 125, 130141

beware infinite loops, 134135

breaking out of loops, 135138

continue keyword, 138139

factorial example, 135

nesting, 139141

nesting for loops, 139141

syntax of, 132134

syntaxes of, 132134

Fstream

or ofstream constructor, 275276

standard library, 271272

Function arguments, 175176

file stream objects as, 287289

multiple, 176178

passing arrays as, 208210

passing structures as, 305307

Function arguments, pointers as, 228232

passing arrays using pointer notations, 228230

passing single variables using pointer notations, 230232

Function body, 5

Functions, 161

C++ string class, 243

calling, 164165

case conversion, 256257

character, 243

cin objects getline, 205208

cin.get, 245248

cin.ignore, 248252

C-string, 243

defining, 163164

main, 5

prototype and header, 175

returning values from, 182183

returning values from functions, 182183

sending information to functions, 173181

terminology of, 162163

that check values of characters , 258

variable scope and lifetime, 167172

Functions, character, 256258

case conversion functions, 256257

functions that check values of characters, 258

Functions, C-string and C++ string, 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

Functions, defining and calling, 162166

calling functions, 164165

defining functions, 163164

prototyping, 165166

terminology of functions, 162163

Functions, open member, 273275

file modes, 274275

specifying files to be opened, 273274

Functions, returning pointers from, 236239

returning pointers to created variables, 238239

returning pointers to local variables, 236237

returning pointers to static local variables, 237238

Functions, sending information to, 173181

passing arguments by reference, 178181

passing arguments by value, 174178

Категории