This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

calling 'xxx' like a member



Header file foo.h:

class foo {
 public:
  foo() { }
};

Header file bar.h:

class bar {
 public:
  bar() { }  
  foo() { }
};

main.cpp:

#include "foo.h"
#include "bar.h"

main()
{
	foo testfoo;
	bar testbar;

	testbar.foo();
}

This causes an error like this:
main.cpp: In function `int main()':
main.cpp:9: calling type `foo' like a method

This is a bug, isn't it?

I'm using:
egcs-2.91.40 snapshot-19980608

regards, Haakon


--
Håkon Innerdal, Programmer, FunCom Oslo AS,
<hakoni@funcom.com>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]