From: Damian Yerrick 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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 >> *&)' >> >> Code Segment: >> template >> struct tNode { >> tItem data; >> tNode *right, *left; >> }; >> >> template >> typedef void tCallBack(tNode* &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 typedef void (*tCallBack)(tNode *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/