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.

412C++ For Dummies, 5th EditionFORTRAN error returns,331–332. See alsoWRITE debuggingtechniqueforward declaration, 207forward slash, asterisk (/*)commenting, 23freeware programs, 396fstream I/O subclasses,315–320functional programming,158functionswith arguments, 85–87class, defined in(member), 168–174described, 79details, 83–84include files, 91–92main() keyword, 87with multiplearguments, 87names, overloading, 87–89objects, passing to,187–192operators, comparing,305–306pointers, passing to,117–119prototypes, defining,89–90single-stepping,151, 381–382static members, declaring,255–258templates, generalizinginto, 353–355understanding, 84variable storage types, 91writing and using, 79–83• G •global variable/objectbefore main(), order ofconstruction, 235defined, 91, 210, 233order of construction,235–236Gookin, Dan (PCs ForDummies), 393greater than logicaloperator (>), 48–49, 63greater than or equal tological operator (>=),48, 49• H •.h include file designation,92, 293HAS_A relationship, classinheritance, 267–268head pointerdefined, 196, BC27space, leaving, 255heap memoryallocating (newcommand), 122, 311buffers, failure toreturn, 296constructor, allocating,244–246described, 119–120destructing, 218–219handling, 382object, allocating off, 193scope, limiting, 120–123help menuDev-C++, customizing, 388opening box, 21hexadecimal systemAND calculation, 59described, 55highlightingmatching braces/parentheses, 386–387types of words, 386“his address is” pointeroperator (*). Seeasterisk character• I •ID number, maps and,371–374identical declaration rule,exception to, 276if statement,implementing, 62implementing source code,294–295, 296–298include filesBUDGET5 sampleprogram, BC43contents, inserting duringcompilation, 178described, 389functions, 91–92syntax, 293increment operator (++)binary arithmetic, 40pointers to strings,combining withdereferencing, 130–131unary arithmetic, 43–44indexto character strings,135–136start of, 184inequality logical operator(!=), 48infinite loops, avoiding,69–70inheritancedescribed, 261–262HAS_A relationship,267–268mechanics, 263–267reasons for, 262–263inheritance, multipleambiguities, straighteningout, 341–342avoiding, 383described, 339–341negative aspects of using,349–350objects, constructing, 349virtual, adding, 342–349initializingarrays, 98–99for loop, 67object as part ofdeclaration, 210–211variables, 34inlining member functions,179

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

Saved successfully!

Ooh no, something went wrong!