Chapter 17 Defining a Sketch Class. Page 1043
Form1(void) : drawing(false), firstPoint(0),
elementType(ElementType::LINE), color(Color::Black),
tempElement(nullptr), sketch(gcnew Sketch())
{
InitializeComponent();
//
SetElementTypeButtonsState();
SetColorButtonsState();
//
}
Hi,
When I try to compile the above code I get the following error:
error C2614: 'CLRSketcher::Form1' : illegal member initialization: 'sketch' is not a base or member.
Any help will be greatly appreciated.
Thanks.
|