You are viewing a single comment's thread. Return to all comments →
If you use "Box b", when the function is called: cout<
On the other hand, if you use const Box &b, only a pointer to my_box will be passed to the function and no new object will be created/destroyed.
Seems like cookies are disabled on this browser, please enable them to open this website
Box It!
You are viewing a single comment's thread. Return to all comments →
If you use "Box b", when the function is called: cout<
On the other hand, if you use const Box &b, only a pointer to my_box will be passed to the function and no new object will be created/destroyed.