From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: I need help with a fraction class Date: Thu, 30 Oct 1997 18:28:55 -0800 Organization: Alcyone Systems Lines: 35 Message-ID: <34594267.73BF5452@alcyone.com> References: <34596DBB DOT 6281 AT erols DOT com> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk nick wrote: > #include "bool.h" > > class fractype{ > public: > void write() const; > float floatequiv(); > void simplify(); > fractype operator*(fractype frac2) const; > boolean operator==(fractype frac2) const; > fractype (int initnumer, int initdenom); > private: > int numer; > int denom; > }; > fraction.h:9: syntax error before `operator' > fraction.cpp:13: parse error before `::' > fraction.cpp:50: parse error before `::' > fraction.cpp:51: no `int fractype::operator ==(class fractype) const' > member function declared in class `fractype' The token which comes before the syntax error report here is `boolean'. `boolean' is not a standard C++ datatype; perhaps you meant `bool'? (Also, the #include of "bool.h" is erroneous, unless you actually define `boolean' there, which apparently you don't.) -- Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com Alcyone Systems / http://www.alcyone.com/max/ San Jose, California, United States / icbm://+37.20.07/-121.53.38 \ "After each war there is a little / less democracy to save." / Brooks Atkinson