Hi Experts can I do dynamic binding like this. objshapes is the parent class called Shape and Rectangle is the child class. I have a few child classes so depending which shape the user selects, I need to bind the correct shape to the objShapes. So i thought i can bind like this. but i getting an error.
Shape *objShapes[3];
objshapes[size]= &new Rectangle(3,lvaule,5)
//error: lvalue required as unary ‘&’ operand
Hope someone can assist. Thanks
IS THIS CORRECT
objshapes[size]= new Rectangle(3,lvaule,5)