MyFill is a class and MyFill2 is a function inside that class.
What is the difference in between declaring a variable inside public function of the class like this (thickness and lineType) -->
MyFill::MyFill (Mat img, Point center)
{
MyFill2 (img, center);
}
void MyFill::MyFill2(Mat img, Point center)
{
int thickness = -1;
int lineType = 8;
circle (
img,
center,
w/32,
Scalar( 0, 0, 255 ),
thickness,
lineType
);
}
...and just declaring them in private label (private:), like in the header file -->
class MyFill {
public:
MyFill(Mat img1, Point center1);
void MyFill2 (Mat img, Point center);
private:
int thickness = -1;
int lineType = 8;
};
The first one works right. But the second one doesn't. If I want to go with the second option, what I need to do? A right code with some explanation might help.