11.07.2015 Views

tYSR20

tYSR20

tYSR20

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

410C++ For Dummies, 5th Editionconstant data member,constructing, 232–233constant, declaringvariables, 34constructorwith arguments, 221–223benefits of using, 210–211class members, 228–233default, 227defined, 210duplex, constructing,214–216multiple objects,constructing, 213–214object declaration trap,228order of construction,233–237overloading, 223–226single object,constructing, 212–213subclass, 265–266virtual functions, 277containersclasses linked to library,200iterators, 368–370list, 366–368listing, BC38–BC43maps, 371–374objects stored in row(vector), 355reason to use, BC37–BC38Standard TemplateLibrary, described, 363string, 364–366continue command,breaking loops, 72copiesobjects, 192shallow versus deep,244–248template files, BC49copy constructorassignment operatorversus, 307–308automatic, 242–244benefits of using, 239–240shallow versus deepcopies, 244–248temporaries, 248–250using, 240–242countingarrays, 99floating-point numbers, 32loops with autoincrement/autodecrementoperators, 65–66while loops, 64–65counting numbers. Seeintegers.CPP file. See source filecredit card and namegrouping sample class,162–166curly braces ({})described, 62–63highlighting matching,386–387• D •dataprotecting, 379–381static members,referencing, 253–255debuggercommonalities, finding,147–148described, 140, 147single-stepping throughprogram, 149–154,381–382test program, running,148–149debuggingwith Debugger, 147–154errors, identifying typesof, 139–140information, including, 387initializing globalvariables, 235options, setting, 15–16with WRITE technique,140–147decimal number system(double precisionfloating-pointvariables)bitwise logicaloperators, 54described, 30–31declarationorder of construction,236–237pure virtual functions,290–291variables, 34writing, 24–25declaring variablesconstants, 34described, 27–28file name problems, 35floating-point numbers,limitations of, 31–32integers, limitations of,29–30mixed-mode expressions,36–37special characters, 35truncation problem,solving, 30–31types, 28–29, 33–34decomposing expressions,41–42decrement operator ( -- )binary arithmetic, 40unary arithmetic, 43–44default constructors, 227deprecated functions, 104dereferencing pointers toobjectscombining with incrementoperator, 130–131declaring, 186–187destructorbenefits of using, 217order of construction, 237subclass, 267virtual functions, 277–278working with, 217–220details, functions, 83–84

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!