"xxx is a private member" message
Paul Koning
pkoning@xedia.com
Wed Oct 29 11:56:00 GMT 1997
egcs gives the following message:
foo.cc: In method `void foo::bar()':
foo.cc:12: member `i' is a private member of class `foo'
foo.cc:13: confused by earlier errors, bailing out
while gcc 2.7.2.1 doesn't complain, for the following program:
class foo
{
int i;
public:
void bar(void);
};
void foo::bar(void)
{
struct
{
int j[i];
} k;
k.j[1] = 0;
}
Is that due to a C++ standard change or is something else going on?
paul
More information about the Gcc
mailing list