deriving a class from STL class list???

From: Barry Hynes (hynesb_at_mar.dfo-mpo.gc.ca)
Date: 11/24/04


Date: Wed, 24 Nov 2004 17:19:22 GMT

Hi there,

Implement a class safeList, that is derived from the STL class list and uses
exception handling.

I have done a little bit of reading and it says that it is not wise to
derive from STL classes because there are no virtual destructors...

is there a specific way to do this?

any help greatly appreciated

Barry



Relevant Pages

  • OT Slightly perhaps? Need scripting language compatible with C++ exceptions
    ... You all know the drill... ... destructors not called in C (or other ... setjmp/longjmp for exception handling, ...
    (comp.lang.cpp)
  • Re: Aspect oriented programming in C#
    ... programming. ... I was reading through this link and just thought about it ... The problems it presents could be solved much better with proper implementations using design patterns. ... A far better example for aspects is exception handling. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Why We Use C Than C++...
    ... what simplifies the whole thing quite a bit without adding more complexity and new features to the language itself. ... destructors can perform any arbitrary cleanup actions ... Using exception handling, it is easy to do automatic cleanups ...
    (comp.lang.c)
  • Re: This newsgroup must be moderated!
    ... Barry wrote: ... that live here and infest this group. ... either bugger off and ... stop reading it or learn to use a kill file. ...
    (uk.radio.amateur)
  • Re: OOP question about properties & methods
    ... My name is Barry! ... Just reading a property shouldn't change the property. ... string text = b.Text; ... If this code would throw an exception for your property, ...
    (microsoft.public.dotnet.general)