Path: utzoo!attcan!uunet!mcsun!ukc!newcastle.ac.uk!stobhill!nlfm From: Lindsay.Marshall@newcastle.ac.uk (Lindsay F. Marshall) Newsgroups: comp.lang.c++ Subject: re: how do you define classes that refer to each other ??? Message-ID: <1990Mar26.115427.14031@newcastle.ac.uk> Date: 26 Mar 90 11:54:27 GMT Sender: news@newcastle.ac.uk Organization: Computing Lab, University of Newcastle upon Tyne, UK, NE1 7RU Lines: 30 Just to be awkward, can anybody suggest a legal way of doing the following :- class B; class A { public: A(); void fa(void (*B::fb)()); }; class B { public: B(); void fb(void (*A::fa)()); }; CC 2.0 gives syntax errors when you try to do this, g++ 1.37.1 gives reasonable error messages. I don't know why you might want to do this, but I'm sure someone out there will want to do it some time. Lindsay -- MAIL : Lindsay.Marshall@newcastle.ac.uk (UUCP: s/\(.*\)/...!ukc!\1/) POST : Computing Laboratory, The University, Newcastle upon Tyne, UK NE1 7RU VOICE: +44-91-222-8267 FAX: +44-91-222-8232