From: "J.A. Bijsterbosch" Newsgroups: comp.os.msdos.djgpp Subject: Re: Templates, Classes, Friends & DJGPP 2.01 Date: 7 Apr 1998 16:42:04 GMT Organization: World Online Lines: 58 Message-ID: <01bd6205$d506e7c0$LocalHost@default> References: NNTP-Posting-Host: asd2-p97.worldonline.nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hello Sed, Sed Johnson schreef in artikel ... > > Hello, > > I recently upgraded from DJGPP 2.00 to 2.01, I > upgraded from GPP/LGPP272 to GPP/LGPP280, etc. Hmm, haven't yet but will do. > 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 Node > { > friend Iter; > friend List; > private: > ..... > > Iter and List are classes which are described > after this class. Shouldn't you have the declarations for Iter and List before your Node class? Try what happens if you put the following lines before class Node in your code: template class Iter; template class 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? Personally I'm supprised it worked anyhow if your source was as you described. If the definitions of Iter and List come after the Node class they don't exist as far as the compiler is concerned, unless you declare them before Node. After that it isn't important where the definition resides. -- Greetings from sunny Amsterdam Jan email: bijster AT worldonline DOT nl http://home.worldonline.nl/~bijster