CMPSC 24 Lecture Notes - Lecture 8: Postfix (Software), Linked List

42 views2 pages
28 Feb 2018
School
Course
Professor

Document Summary

9:46 am iostream peak() peak function looks ahead and checks the next character without directly reading it into the stream use this function when you have mixed info, like characters and numbers in the same line. Right most operand in front, followed by numbers i. e. ((9+6)/3) ---> / + 9 6 3. Left most operand at end, lead by numbers i. e. 9 6 + 3 / Addition is always to the back of the queue. Next person is at the front of the queue. Removals are from the front of the queue. Head is the qfront and tail is the qback class queue{ private: nod* qfront; node* qback; template void queue::enq(t& entry){ node* newnode = new node(entry, null); if(qback == null){ qfront = newnode; Week 6 page 1 qfront = newnode; qback = newnode; qback -> setlink(newnode); qback = newnode; else{ template

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers