delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/13/02:13:45

Message-ID: <391CB150.D5793CD2@home.com>
From: Robin Johnson <robbat2 AT home DOT com>
Organization: Orbit Computers
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en,af,es
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: template error
References: <39190F26 DOT 609A37C8 AT home DOT com> <391C05F1 DOT 1AF32F2D AT gmx DOT de> <9t8ohs03a7hgg5aoev1junbd4hbe6cqlfs AT 4ax DOT com>
Lines: 33
Date: Sat, 13 May 2000 01:35:00 GMT
NNTP-Posting-Host: 24.113.36.103
X-Complaints-To: abuse AT home DOT net
X-Trace: news1.rdc1.bc.home.com 958181700 24.113.36.103 (Fri, 12 May 2000 18:35:00 PDT)
NNTP-Posting-Date: Fri, 12 May 2000 18:35:00 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> >> 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);
It still doesn't work... same error without the '&'
but it needs to be able to change the pointer as well, so that will have
to go back eventully

-- 
Robin Hugh Johnson
"Robbat2"
QTOD: "I used to be an idealist, but I got mugged by reality."
E-Mail     : robbat2 AT orbis-terrarum DOT net
ICQ#       : 30269588 or 41961639
Home Page  : http://www.orbis-terrarum.net
Time Zone  : Pacific Daylight (GMT - 8)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019