Cannot Modify Non Const Member in Class
I try to modify one specific method in OpenCV. In the class definition;
class CV_EXPORTS CvANN_MLP : public CvStatModel
...
protected
...
int activ_func;
when I try to modify activ_func field, I get:
error: assignment of data-member in read-only structure
error, however it is not defi开发者_开发问答ned as const, how is that possible?
Unfortunately, you didn't give the context of the assignment statement itself. But I'm guessing that you're trying to assign to activ_func
from a const
member function.
精彩评论