开发者

error C2248: 'Gdiplus::Bitmap::Bitmap' : cannot access private member declared in class 'Gdiplus::Bitmap'

i am getting this error and i dont know why or understand the reason:

    vector<double> fourier_descriptor(Gdiplus::Bitmap myBitmap)
{


    vector<d开发者_C百科ouble> res;
    Contour c;
    vector<Pixel> frame;// = c.GetContour(p);

frame = c.GetContour(myBitmap);


    return res;

}

the error is in this line frame = c.GetContour(myBitmap);


I can't find a reference for the GetContour method, but that looks like you're trying to pass a Bitmap by value, which (if I remember my C++ correctly) will invoke the copy constructor -- and Bitmap doesn't have a public copy constructor.

If you own Contour, rewrite that function to take a Bitmap* or Bitmap& instead (i.e. pass a pointer or reference), thereby avoiding the copy constructor.


Try passing it via reference:

vector<double> fourier_descriptor(Gdiplus::Bitmap& myBitmap)

Ny passing it by value, you make a copy of it, and Bitmap doesn't permit that.


Gdiplus::Bitmap in non-copyable. And you are trying to copy it when you attempt to pass it around by value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜