From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) Newsgroups: comp.os.msdos.djgpp Subject: Re: "lookuping" error Date: 31 Dec 1997 11:06:51 GMT Organization: The National Capital FreeNet Lines: 42 Message-ID: <68d90b$3v4@freenet-news.carleton.ca> References: Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) NNTP-Posting-Host: freenet3.carleton.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk oferco (oferco AT cs DOT huji DOT ac DOT il) writes: > Hye, > > Anyone who can, PLEASE answer this: > > My compiler complains: > foo.cc: in method x: > foo.cc: 3523: cannot lookup method in incomplete type 'Memory' > > where Memory is a class I use in the Method x, which is > a member of the class A - defined in foo.cc and declared > in foo.hh > BUT > all the other methods of A, which use Memory, are not reffered > to by this kind of error - only x !!! > > WHATS WRONG??? All the other uses probably pass pointers to the class around. It looks like you've got a forward declaration like class Memory; followed by this class, and later by the Memory class. You should instead either change method X in the class to just inline int x (Foo bar, Memory lapse); And write a method body after the body of class Memory: inline int x (Foo bar, Memory lapse) { lapse.happen(); bar.baz(); return 42; } -- .*. Friendship, companionship, love, and having fun are the reasons for -() < life. All else; sex, money, fame, etc.; are just to get/express these. `*' Send any and all mail with attachments to the hotmail address please. Paul Derbyshire ao950 AT freenet DOT carleton DOT ca pgd73 AT hotmail DOT com