delorie.com/archives/browse.cgi | search |
From: | "Stefan Schimanski" <1Stein AT gmx DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Trying to get Templates to work (SLList) |
Date: | Mon, 10 Nov 1997 20:29:11 +0100 |
Organization: | 1Stein-Software |
Lines: | 27 |
Message-ID: | <647n96$abb$1@news.metronet.de> |
References: | <346615c3 DOT 9438511 AT news DOT virgin DOT net> |
NNTP-Posting-Host: | braunschweig2.pop.metronet.de |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
I had similar problems with template. I solved them by included the whole source code of the template in the header file. Moreover I had to implement the constructor in the class declaration like an inline function. When I tried to put the body somewhere below it didn't work. steve DOT waddicor AT virgin DOT net schrieb in Nachricht <346615c3 DOT 9438511 AT news DOT virgin DOT net>... >Attached is my first attempt at using templates with DJGPP. It fails >during linking with the error message: > >Creating: planet.exe >Error: 3dotest.o: In function `SLList<int>::~SLList(void)': >3dotest.cc(93) Error: undefined reference to `BaseSLList::clear(void)' > >Has anyone any idea what the problem is. I've looked at the FAQ, >Info, and dejanews, but I'm obviously missing something. > > > >#include <sllist.h> > >main() >{ >SLList<int> list; >}
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |