[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compilation errors with c++ package



On Sat, Mar 24, 2001 at 05:03:06AM -0500, Chris Ruffin wrote:
> In file included from List.cc:4:
> List.h:241: warning: ANSI C++ forbids declaration `BIstream' with no type
> List.h:241: `BIstream' is neither function nor method; cannot be declared friend
> List.h:241: parse error before `&'
> make: *** [List.o] Error 1
> 
> The source that seems to be causing this is in the include file List.h
> which gets included from List.cc:
> 
> friend BIstream & operator>> (BIstream & in, List<T> & list);

Looks like BIstream is only declared ~20 lines *after* this line. Try
moving/copying the "class BIstream;" before the definition of
"template <class T> class List".

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  CS student at the Technische  |  GnuPG key:
  | \/¯|  http://atterer.net  |  Universität München, Germany  |  0x888354F7
  ¯ ´` ¯



Reply to: