
9 Jun
2010
9 Jun
'10
3 p.m.
AMDG Brian Martin wrote:
Thanx for the reply. If by dereferencing the pointer you mean for_each(shapes.begin(), shapes.end(), bind(&shape::draw, *_1, 2));
then I get another error - cannot instantiate abstract class.
Yeah. I fixed this yesterday. There's also a possibility that &*_1 will work.
Plus I would expect the dereferencing to slice off the derived bits of circle and rectangle.
It won't, because the objects will be passed by reference. In Christ, Steven Watanabe