CISC 2200 Lecture Notes - Lecture 6: Operator Overloading, Memory Map

21 views1 pages

Document Summary

Review notes: operator overloading, friend function, can access the private variables, member function. Used for *, ++, !: parameter (const rational & n) const, drawing memory map, scopes and lifetime, static variable. In a function, the lifetime is the program not just the function. Write code to make pointer q points to the node that stores value 50. Note: you can assume that such node exists. Node *q = head; while(q -> value != 50) Expand the above code to make another pointer r to the node before the node(50). 50 happens to be the first node, make r"s value null; Node *r = null; while(q -> value != 50)

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

Related Documents