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.

416C++ For Dummies, 5th Editionproject fileDev-C++, creating, 388source code, 298properties of classaccessing, 163defined, 162properties, shared. Seeinheritanceprotecting membersbenefits of using, 201–202,379–381class with limitedinterface, using, 205internal state of class,protecting, 204–205mechanics, 202–204non-member functions,permitting access to,205–208operators, overloading,311prototype functions,defining, 89–90public declaration, 162pure virtual functionsdeclaring, 290–291defined, 286• R •range, limited forintegers, 30Rathbone, Andy (MicrosoftWindows MeMillennium EditionFor Dummies, Windows98 For Dummies, andWindows 2000Professional ForDummies), 393reading directly fromstream I/O, 320–322real-world objects,simulating withclasses, 168referencebenefits of using, 192objects, passing by, 271pointers, passing by, 119pointers versus, 193–194static data members,253–255reference operator, callingfunction by, 191–192referential argument,referring to temporaryobject, 250related data elements,grouping into singleobject, 167results of expressions,storing, 26return value, 83reviewing annotatedprogramming, 21–25Roman numerals, 56round-offdecimals, 32, 52integers, 29–30runtime arguments,declaring, 272• S •scopeexamining, 121–122memory heap, limiting,120–121scope resolution operator(::), 175–177segment violation error, 133semantics, 10semicolon (;), 23sequences, storing. Seearrayshallow copiescopy constructor, 244–248operators, 307–308shareware programs, 396short-circuit evaluation, 53shortcut to start Dev-C++,creating, 17signature, function, 89simple operatorscomparison, 48–49floating-point variables,51–53logical int variables, 51logical values, storing,49–51simple test, bitwise logicaloperators, 59–60simple things, arrays of andpointers to, 183–184single bit operators, 57–58single object, constructing,212–213single-steppingdebugger throughprogram, 149–154paths, recommended,381–382software modification,inheritance and, 263sort() method, 370, 371source codecomments, clarifying with,22–23Dev-C++ project file,creating, 298–301implementing, 294–295,296–298modules, 291–292namespace, dividing,293–294program, dividing,292–293, 295–296project file, 298source filebreakpoints, resettingafter editing, 388class definitions,allocating manually, 253defined, 10factoring, 291–292Visual C++.NET,associating, 13spaces, in filenames, 389special characters, 35special controls, applyingto loops, 70–72splat character (*). Seeasterisk character (*)square brackets ([])arrays, declaring, 183–184class definition, 162

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

Saved successfully!

Ooh no, something went wrong!