11.07.2015 Views

tYSR20

tYSR20

tYSR20

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Index 415OR logical operator (||)short-circuit evaluation, 53simple comparison, 48, 49order, mathematicaloperations, 42–43order of constructiondeclaration, 236–237destructors, 237global objects, 235–236local objects, 234before main(), 235rules, 233static objects, 234–235output, generating, 25. Seealso I/O statements;stream I/Ooverloadingassignment operators,308–311constructors, 223–226function names, 87–89functions, generally, 224member functions,181–182operators, 305, 382protected function withoperators, 311stream I/O, operatorsfor, 313overriding the base classfunction, 272• P •parameters, 136–138parentheses (())function names, writing,80–81highlighting matching,386–387object declaration trap,228operator precedence,forcing, 127, 186parse, 20passingabstract classes, 289objects to functions,187–192pointers to functions,117–119paths, single-stepping,381–382PCs For Dummies (Gookin),393PC-screen-repaint sampleproblem, 73–74pointeraddress operators,111–112array, declaring and using,133–138arrow pointers, 187benefits of using, 192calling function with,189–190contrasting with array,132–133to current object withinmember function(this keyword), 258defined, 109dereferencing, 186–187described, 185–186different types, using,114–117errors, finding,147, 149–150and houses, comparing,114memory heap, 119–123passing to functions,117–119pointer variables, definedand using, 112–113references versus,193–194variable size, 109–110pointer variablesaddress of array, applyingoperators to, 128–129arrays and, 126–127defining and using,112–113expanding to string,129–131operators, 125–126other than char, 131–132string manipulation,justifying, 131polymorphismbenefits of, 272–274mechanics of, 274–276postfix incrementoperator, 44precedencebinary arithmeticoperators, 40defined, 42–43prefix incrementoperator, 44preprocessor program, 91profiler, 389–392programdefined, 10–11source code, dividing,292–293, 295–296source code on back-of-the-book CD, 397Visual C++.NET, adding toproject, BC47–BC49writing, 11–12program flowbranch commands,controlling with, 61–63loops, executing, 63–72nesting controlcommands, 73–74switch statement, 74–75programmingbuilding (generatingexecutable machineinstructions), 18–20calculating expressions,25–26executing, 20–21instructions, entering withtext editor, 17–18reviewing annotated,21–25projectVisual C++.NET, building,BC45–BC47Visual C++.NET program,adding, BC47–BC49

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

Saved successfully!

Ooh no, something went wrong!