[OT] Re: Question about C++ (please, answer)



On Thu, 2001-01-25 at 18:00:09, Eric Jung wrote:

> Hi, everyone.
> 
> I have a simple (or complex) c++ question.
> The below source code do not be compiled and make errors.
> I really don't know why. Maybe I'm too foolish -_-;
> I'll wating for your answering. Thanks so much.

Apply simple patch:

--- cut here ---
@@ -10,8 +10,8 @@
 protected:
     void draw()
     {
-        ((Widget*)this)->_i++;
-        ((Widget*)this)->draw();
+        _i++;
+        Widget::draw();
     }
 };

--- cut here ---

... and read Stroustrup :-)


Zbigniew




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]