473,472 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1108

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Snake Djip | last post by:
Hi, I have a problem with a home-made DLL used in an ASP environment. It is coded in VB6, apartment-threaded. The DLL returns a binary PNG stream (an image). I use it with ASP's...
1
by: Larry | last post by:
I have a VB background and am developing a new windows app in Csharp. I'm getting the error. 'inaccessible due to its protection level' I've added a TextBox1 and a Button1 to a form. I...
6
by: Bill Rubin | last post by:
The following code snippet shows that VC++ 7.1 correctly compiles a static member function invocation from an Unrelated class, since this static member function is public. I expected to compile the...
7
by: Fir5tSight | last post by:
Hi All, I used the following code in C#: using System.Drawing; //blah blah blah Bitmap bmp = new Bitmap();
1
by: jheled | last post by:
Staring with g++ 3.4, this code results in an error ---------------------------------- struct A { }; class B : private A { };
6
by: milund | last post by:
I have a "funny" after upgrading to .NET2.0. The following code is placed inside an unsafe method in assembly "A" System.Object myIUnknownObject =...
0
by: Shane | last post by:
(reposted from comp.sys.hp.hpux) The following code compiles fine on A5.52 and other compilers, however aCC 6.15 generates an error: #include <vector> using namespace std; class ClassA :...
10
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the...
3
by: =?ISO-8859-1?Q?Marcel_M=FCller?= | last post by:
In the code below gcc says test.cpp: In constructor `SingleInfoDialog::SingleInfoDialog(const PlayableSetBase&)': test.cpp:2: error: `class PlayableSetBase' is inaccessible test.cpp:24: error:...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.