delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/04/13:54:12

To: djgpp AT delorie DOT com
Date: Sat, 04 Apr 1998 10:51:47 -0700
From: "Sed Johnson" <oplop AT mailexcite DOT com>
Message-ID: <OPACMBMALOKEAAAA@mailexcite.com>
Mime-Version: 1.0
Subject: Templates, Classes, Friends & DJGPP 2.01
Organization: MailExcite (http://www.mailexcite.com:80)

Hello,

I recently upgraded from DJGPP 2.00 to 2.01, I 
upgraded from GPP/LGPP272 to GPP/LGPP280, etc.

Under my old installation, the program I am working
on (which uses templates and has Friend members in
different class) compiled and executed perfectly.
This was with using the #pragma interface method
and also linking with -fexternal-templates.

Since I've upgraded my DJGPP though, I get several
errors on compilation.  I searched through the FAQ
and the inf files and could not find anything that
I was doing wrong.  Here is a bit of the code that
is causing errors:

......
  template <class T> class Node
  {
      friend Iter<T>;
      friend List<T>;
   private:
......

Iter and List are classes which are described
after this class. 


Here are some errors I get:

...........
 `v_²' is neither function nor method; cannot be declared friend  (corresponds to
friend Iter)

 `ñ!' is neither function nor method; cannot be declared friend (corresponds to
friend List)
...........


There are also a few other errors I get too, but I
think if someone could help me understand why I'm getting errors now, after it worked
perfectly before, I
can figure out the rest.  

Any ideas why this code is longer is working, please? 




Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

- Raw text -


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