OT: C++ (was: [cc65] malloc and Sort.c(26): Error: Expression expected)

Date view Thread view Subject view

From: Spiro Trikaliotis (spiro_at_ivs.cs.uni-magdeburg.de)
Date: 2003-03-05 18:50:17


Christian Krüger wrote:

> Or why is it possible to declare a destructor 'non-virtual'?

Because it is not always necessary - if you don't inherit your classes.
There are times where this is usefull.

This is one of the ways C++ handles the more complexity in regard to C:
You have the choice to use classes as "more powerful" structs, thus,
having a constructor and a destructor w/o too many speed drawbacks, because
you do not need a virtual table (which you would need if the destructor
would always be virtual).

In fact, you can use C++ as a "C enhanced" when you restrict yourself
to the things that don't have much speed and/or size drawbacks. If you
make sure that the run-time system reflects these limitations, C++ is
nothing more than a more handy C-variant. There are some efforts in this
area, I think one of them is called "embedded C++".


To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-03-05 19:33:28 CET