Thread
:
Question about passing objects into member functions
View Single Post
Sep 27th, 2005, 7:00 PM
#
2
DaWei
Resident Grouch
Join Date: Jun 2005
Posts: 6,453
Rep Power:
10
a1.comparePrice uses the a1 price; you just told it to. It compares it against the b1 price because you explicitly told it to (z.price, where z = b1).
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner:
Grumpy on C++ Exceptions
DaWei on Pointers
DaWei
View Public Profile
Visit DaWei's homepage!
Find More Posts by DaWei