Error C3767: candidate function(s) not accessible

  • Thread starter Thread starter Iwanow
  • Start date Start date
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.
 
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]
 
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.
 
Back
Top