468,773 Members | 2,421 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,773 developers. It's quick & easy.

error: `Klasa1' is inaccessible

I don't know where and why the error is.
Klasa.h:

class Klasa1
{
protected:
int A, D, M, T;
public:
Klasa1(int a = -1, int d = -1, int m = -1, int t = -1);
Klasa1(Klasa1&);
int PA();
int PD();
int PM();
int PT();
};
class Klasa2 : public KlasaA, Klasa1
{
protected:
enum1 m_enum1;
public:
Klasa2(enum1, KlasaA&, Klasa1&);
Klasa2(Klasa2&);
};
class Klasa3 : public Klasa2
{
protected:
enum2 m_enum2;
public:
Klasa3(enum1, KlasaA&, Klasa1&, enum2);
Klasa3(Klasa3&);
enum2 Enum2();
};
KlasaNr.cc

Klasa2::Klasa2(enum1 pan, KlasaA nag, Klasa1 p) : m_enum1(pan),
KlasaA(nag), Klasa1(p) {}
Klasa2::Klasa2(Klasa2 kopiowana) : m_enum1(kopiowana.m_enum1),
KlasaA(kopiowana), Klasa1(kopiowana) {}

Klasa3::Klasa3(enum1 pan, KlasaA nag, Klasa1 p, enum2 Enum2) :
Klasa2(pan, nag, p), m_enum2(Enum2) {} //8
Klasa3::Klasa3(ZbiorczaLad& kopiowana) : Klasa2(kopiowana),
m_enum2(kopiowana.m_enum2) {}
eTypLad ZbiorczaLad::Enum2() {return m_enum2;}

Error:

g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -g -O2 -c
KlasaNr.cc -MT KlasaNr.lo -MD -MP -MF .deps/KlasaNr.TPlo -fPIC -DPIC -o
..libs/KlasaNr.o
.../../include/Klasa.h: In constructor `
Klasa3::Klasa3(enum1, KlasaA, Klasa1, enum2)':
.../../include/Klasa.h: error: `Klasa1' is inaccessible
KlasaNr.cc:8: error: within this context

what's wrong?
Jul 22 '05 #1
0 1013

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Fir5tSight | last post: by
1 post views Thread by jheled | last post: by
reply views Thread by Shane | last post: by
3 posts views Thread by =?ISO-8859-1?Q?Marcel_M=FCller?= | last post: by
1 post views Thread by CARIGAR | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.