Article View: comp.os.ms-windows.programmer.tools.mfc
Article #84Re: Linked Lists
From: William E. Kempf
Date: Fri, 12 Apr 1996 16:28
Date: Fri, 12 Apr 1996 16:28
39 lines
1962 bytes
1962 bytes
tsk@cts.com (John Lutz) wrote: :In article <31667AC8.4EE2@mindlink.bc.ca>, : Blake Kadatz <blake_kadatz@mindlink.bc.ca> wrote: :>John Lutz wrote: :>> :>> I would like to store all the objects in a linked list for a given :window. I :>> would like for the linked list to handle the dynamic allocation of these :>> object and return the pointer to the subclass that is allocating the :objects :>> on the linked list. I would like for the linked list class to delete all :>> objects dynamically. :> :>Have you tried CObList or CPtrList? These classes don't automatically :>delete the object for you, but when you remove the object from the list, :>it returns you a pointer. Easy -- just delete that pointer. :> : : :Opps, I forgot to mention it's under Visual C++ 4.0 but not using :MFC. : :John : :PS- Also, this project doesn't include MFC, how difficult would it be to :implemente MFC (linking in a .LIB file)? I'm somewhat new to MFC/VC++ but not :to C++. : Linked lists are actually quite easy to implement, if you are looking to do it yourself. Most C++ programming books will discuss how. If you are looking for other libraries that will do it for you, check out either STL (included with VC++ 4.0) or RogueWave. ----- William E. Kempf : http://www.novia.net/~srwillrd "Sir Willard" : mailto:srwillrd@novia.net (home) Knight of the Ascii Table : mailto:wekempf@marlton.1dc.com (work)
Technical Details
Message-ID:
<316e8299.262706081@204.248.25.97>Path:
arc1-ca.pugleaf.net!in2.uu.net!novia!usenetReferences:
<4k2kom$k5r@news2.cts.com> <31667AC8.4EE2@mindlink.bc.ca> <4khrin$m41@news2.cts.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!novia!usenet From: srwillrd@novia.net (William E. Kempf) Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++ Subject: Re: Linked Lists Date: Fri, 12 Apr 1996 16:28:25 GMT Organization: Novia Internetworking <> 28.8kbps dialup; 402/390-2NET Message-ID: <316e8299.262706081@204.248.25.97> References: <4k2kom$k5r@news2.cts.com> <31667AC8.4EE2@mindlink.bc.ca> <4khrin$m41@news2.cts.com> NNTP-Posting-Host: 167.16.65.84 X-Newsreader: Forte Agent .99e/32.201