Error C3767: candidate function(s) not accessible

I

Iwanow

Hello!

I have a single class without any inheritance over there, and I get
that error on its constructor which is an empty function:

LabelProcessor::LabelProcessor() {
}


The full error message is as follows:
..\LabelProcessor.cpp(5) : error C3767:
'System::Drawing::Bitmap::Bitmap': candidate function(s) not accessible

How do I get rid of such an error? Thank you in advance for any hints.
 
S

SvenC

Hi Iwanow,

Iwanow said:
Hello!

I have a single class without any inheritance over there, and I get
that error on its constructor which is an empty function:

LabelProcessor::LabelProcessor() {
}


The full error message is as follows:
.\LabelProcessor.cpp(5) : error C3767:
'System::Drawing::Bitmap::Bitmap': candidate function(s) not accessible

How do I get rid of such an error? Thank you in advance for any hints.

I guess you have a class member of type Bitmap which has no public default
constructor so your LabelProcessor constructor cannot create the Bitmap
instance. Either make that member a pointer which you initialize with gcnew
or initialize it in the constructor list like so#

LabelProcessor::LabelProcessor() :
_yourBitmapVariable(bitmapConstructorParameters)
{
}
[/QUOTE]
 
I

Iwanow

SvenC said:
I guess you have a class member of type Bitmap which has no public default
constructor so your LabelProcessor constructor cannot create the Bitmap
instance. Either make that member a pointer which you initialize with gcnew
or initialize it in the constructor list like so#

SvenC,

Thank you for your help. I noticed that one of my bitmap member
variables was missing the pointer sign (^). I added it, and now it
works perfectly. Thank you very much once again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top