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 417starting Dev-C++, 17statement, executing single.Seesingle-steppingstatements, basingprograms on, 23–24static objectscomplex data member,constructing, 228–232constant data member,constructing, 232–233data, referencing, 253–255functions, declaring,255–258, 277naming, 171order of construction,234–235protecting, 204reasons for using, 251–252this keyword, 258using, 252–253static variable, 91, 233STL (Standard TemplateLibrary). See templatelibrarystoringDev-C++, 14logical values with simpleoperators, 49–51results of expressions, 26stream I/Oendl, terminating with,322fstream subclasses,315–320manipulators, 325–328mechanics, 313–315reading directly from,320–322subclasses (strstream),322–325stringarrays, manipulating withcharacters, 103–106characters, arrays of,101–103container, templatelibrary, 364–366expanding pointervariables to, 129–131length of, 153manipulation, justifying,131variable, described, 33, 34variables, 106–108students, sample programsaboutcourses, associating,170–177, 182GPA, 186–192, 193graduate school, 263–268,292–298ID number, maps and,371–374needs with protectedmembers, 202–208,217–220tuition calculation,269–275style, importance of clearand consistent, 379subclassabstract classes, 287–289constructing, 265–266described, 159destructing, 267stream I/O (strstream),322–325using, 265subscripts, 55switch statement,74–75, 135syntax, defined, 10system requirements backof-the-bookCD, 393• T •tab character (‘t’), 35,385–386tail pointer, 196“tell me your address”pointer operator (&),111–113temperature conversionsample program,17–21, 26template librarycontainer classes objectslinked to, 200described, 363iterators, 368–370list containers, 366–368maps, 371–374sort() method, 371string container, 364–366templatesBUDGET4, BC31–BC37BUDGET5, BC37–BC44classes, 355–361function, generalizinginto, 353–355limitations, 361maximum() functions,variants of, 351–353sample, 22temporary objectavoiding, 249–250described, 248–249referential argument,referring to, 250terminatorcharacter string to,returning (getline()),320–321endl, 322newline character (‘n’),322null terminated array, 129string, 103test program, runningdebugger, 148–149text editor, enteringinstructions with, 17–18text, string displaying,364–366this keyword, 258throw keyword, 335–337true/false. See booleanvariable (bool)truncation problemintegers (int variable),29–30solving, 30–31try block, 332–335typing errors, 20

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

Saved successfully!

Ooh no, something went wrong!