Path: utzoo!attcan!uunet!midway!ux1.cso.uiuc.edu!iuvax!att!att!westmark!mole-end!mat From: mat@mole-end.UUCP (Mark A Terribile) Newsgroups: comp.lang.c++ Subject: int nlegs() const(); Message-ID: <445@mole-end.UUCP> Date: 24 Oct 90 01:21:59 GMT Organization: mole-end--private system. admin: mole-end!newtnews Lines: 23 Today I discovered that I had made an error in a header file and the compiler (Sun's 2.0 release) had not caught it. I had meant to type a member declaration of the form int nlegs() const; but instead typed int nlegs() const(); I am at a loss for what legal declaration (remember, this is in a class header) this might represent. I don't think it does because I noticed this when I went to move the function into a base class. I looked at it, spotted the error, and decided to put the correct declaration (virtual) in the base class to see what sort of hiding message I might get. I got none! Can someone tell me if there is a bug and this illegal, or if it's legal with a legal interpretation and the compiler failed to warn me about a hidden name? -- (This man's opinions are his own.) From mole-end Mark Terribile