delorie.com/archives/browse.cgi | search |
From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: template error |
Organization: | Pin Eight Software http://pineight.8m.com/ |
Message-ID: | <9t8ohs03a7hgg5aoev1junbd4hbe6cqlfs@4ax.com> |
References: | <39190F26 DOT 609A37C8 AT home DOT com> <391C05F1 DOT 1AF32F2D AT gmx DOT de> |
X-Newsreader: | Forte Agent 1.7/32.534 |
MIME-Version: | 1.0 |
Lines: | 37 |
X-Trace: | /bGnt5/sfaxQmVpBwv0JoNoB33Oh5ux9vlziCYnKpvcSZ1hLquPQaqsBgZfv3pFSGKRgTS6A1936!Ltg/j3ecj7TGJSKRW6Vos+KRuHrMsDNKdT1rfxqBOVPDOat8ADH2fvZkzWpE4HPpyOMWpWLKzhHS!ODXj+Q== |
X-Complaints-To: | abuse AT gte DOT net |
X-Abuse-Info: | Please be sure to forward a copy of ALL headers |
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly |
NNTP-Posting-Date: | Fri, 12 May 2000 15:58:29 GMT |
Distribution: | world |
Date: | Fri, 12 May 2000 15:58:29 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
On Fri, 12 May 2000 12:44:49 GMT, Ole Reinartz <ole DOT reinartz AT gmx DOT de> wrote: >Robin Johnson wrote: > >> I am getting an error that I am at a complete loss to explain... >> The g++ FAQ mentions nothing like it, so I thought I'd ask just to be sure... >> >> Error: template declaration of `typedef void ( tCallBack)(struct tNode<tItem> >> *&)' >> >> Code Segment: >> template <class tItem> >> struct tNode { >> tItem data; >> tNode *right, *left; >> }; >> >> template <class tItem> >> typedef void tCallBack(tNode<tItem>* &node); //error here > >Hugh, >What do you want to typef here to what? Is it possible that the 'typedef' is >just wrong here? Untested, but my limited experience (fresh out of C++ class) tells me this: template <class T> typedef void (*tCallBack)(tNode<T> *node); -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |