schmidt%blanche.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") (11/22/88)
Hi,
I believe the following is a rather benign error on the part of g++
1.27. AT&T cfront flags the redeclaration of the parameter types for
member Print as an error, whereas g++ doesn't complain:
----------------------------------------
class Foo {
private:
int Y;
public:
Foo ( int X ) {
Y = X;
}
int Print ( void ) { // declare Print as taking no parameters
cout << "Y = " << Y << "\n";
}
};
class Bar : Foo {
public:
Foo::Print ( int ); // should not be accepted
};
class Foo_Bar : Bar {
public:
Bar::Print ( double ); // ditto
};
main () {
Foo_Bar X ( 10 );
X.Print ();
}
----------------------------------------
thanks,
Doug
----------------------------------------
schmidt@bonnie.ics.uci.edu (ARPA) | Per me si va nella cita dolente.
| Per me si va nell' etterno dolore.
| Per me si va tra la perduta gente.
| Lasciate ogni speranza voi ch' entrate.