-=> Quoting Kevin Campbell to Cameron Clark
> I've been very unsucceful in turning a library into a template
> class.
KC> Linked-lists always seem unwilling to template very well. My only
KC> advice is Don't. It gets easier in the long run if you don't.
I would disagree strongly. Linked lists not only template quite well, but
re
definately worth the effort in the long run. All you have to do is want to
use linked lists more than twice, and the effort is generally paid off.
In fact, the recommendation I have to Cameron is to save the effort, and use
the freely available STL implementation of linked lists.
#include
int main(void)
{
std::list list_of_mytype;
return 0;
}
(Not all compilers currently will require the "std::" part.)
> dll.h - unsorted double linked list
KC> PS: Don't use "dll" for the name of your library, or it could conflict
KC> with some other compilers or libraries (DLL = Windows Dynamic Link
KC> Library).
While I would agree dll.h is a poor name, I doubt that anyone would have an
API header "dll.h"... neither Windows nor OS/2 does, and unix has shared
libraries (.a files), not DLL's.
... I didn't cheat, I just changed the rules!!
___ Blue Wave/OS2 v2.30
--- FastEcho 1.46
---------------
* Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536)
|