home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_12 / 736.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  656KB  |  2550x3300
Labels: book | reckoner
OCR: 736 Chapter Discovering C++ function insert can be foliows: implemented in terms of the intList member function t000 Push( int elt urr intList :insert( elt, Tie position 0 will indicate the beginning of the intL st object The code simply calls inse rt from the intList class to do the insertion at position The value returned by intLj st inser returned. Note The term ..dod, traditionally used for removing elements from the top of a stack. The member function Pop from class intstack will remove an element from an int tSta ck object It will be implemented 17 terms of the intList member function remove Note 5 The function Top) returns the integer on the top of an intStack object. In this design of a stack the function Pop simply removes the element from the top of the intst ack object If does n ...